diff --git a/package/systemd/0019-Allocate-temporary-strings-to-hold-dbus-paths-on-the.patch b/package/systemd/0019-Allocate-temporary-strings-to-hold-dbus-paths-on-the.patch index bd09e60207..007b806c09 100644 --- a/package/systemd/0019-Allocate-temporary-strings-to-hold-dbus-paths-on-the.patch +++ b/package/systemd/0019-Allocate-temporary-strings-to-hold-dbus-paths-on-the.patch @@ -10,14 +10,14 @@ clear way to understand if the allocation fails. (cherry picked from commit f519a19bcd5afe674a9b8fc462cd77d8bad403c1) [baruch: backport to v240] Signed-off-by: Baruch Siach +[Adam: Update for v241] +Signed-off-by: Adam Duskett --- -Upstream status: commit f519a19bcd5 - src/libsystemd/sd-bus/bus-objects.c | 68 +++++++++++++++++++++++------ 1 file changed, 54 insertions(+), 14 deletions(-) diff --git a/src/libsystemd/sd-bus/bus-objects.c b/src/libsystemd/sd-bus/bus-objects.c -index d0538104ae25..54b977418e03 100644 +index 58329f3fe78..54b977418e0 100644 --- a/src/libsystemd/sd-bus/bus-objects.c +++ b/src/libsystemd/sd-bus/bus-objects.c @@ -1133,7 +1133,8 @@ static int object_manager_serialize_path_and_fallbacks( @@ -34,7 +34,7 @@ index d0538104ae25..54b977418e03 100644 return 0; /* Second, add fallback vtables registered for any of the prefixes */ -- prefix = alloca(strlen(path) + 1); +- prefix = newa(char, strlen(path) + 1); + pl = strlen(path); + assert(pl <= BUS_PATH_SIZE_MAX); + prefix = new(char, pl + 1); @@ -81,7 +81,7 @@ index d0538104ae25..54b977418e03 100644 + if (!prefix) + return -ENOMEM; -- prefix = alloca(strlen(path) + 1); +- prefix = newa(char, strlen(path) + 1); OBJECT_PATH_FOREACH_PREFIX(prefix, path) { n = hashmap_get(bus->nodes, prefix); if (n) @@ -113,7 +113,7 @@ index d0538104ae25..54b977418e03 100644 if (bus->nodes_modified) continue; -- prefix = alloca(strlen(path) + 1); +- prefix = newa(char, strlen(path) + 1); OBJECT_PATH_FOREACH_PREFIX(prefix, path) { r = emit_properties_changed_on_interface(bus, prefix, path, interface, true, &found_interface, names); if (r != 0) @@ -131,7 +131,7 @@ index d0538104ae25..54b977418e03 100644 if (bus->nodes_modified) return 0; -- prefix = alloca(strlen(path) + 1); +- prefix = newa(char, strlen(path) + 1); + pl = strlen(path); + assert(pl <= BUS_PATH_SIZE_MAX); + prefix = new(char, pl + 1); @@ -155,7 +155,7 @@ index d0538104ae25..54b977418e03 100644 if (bus->nodes_modified) return 0; -- prefix = alloca(strlen(path) + 1); +- prefix = newa(char, strlen(path) + 1); + pl = strlen(path); + assert(pl <= BUS_PATH_SIZE_MAX); + prefix = new(char, pl + 1); @@ -179,7 +179,7 @@ index d0538104ae25..54b977418e03 100644 if (bus->nodes_modified) return 0; -- prefix = alloca(strlen(path) + 1); +- prefix = newa(char, strlen(path) + 1); + pl = strlen(path); + assert(pl <= BUS_PATH_SIZE_MAX); + prefix = new(char, pl + 1);