rpc-pipefs-generator: allocate enough space for pipefs-directory buffer
Subsystems (2)
PATCH 1/1 rpc-pipefs-generator: allocate enough space for pipefs-directory buffer
Commit 7f8463fe fixed a warning but introduce
a regression by not allocating enough space
for the pipefs-directory buffer when it is
not the default.
Signed-off-by Steve Dickson <[email protected]>
--- systemd/rpc-pipefs-generator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
systemd/rpc-pipefs-generator.c +1 -1
@@ -28,7 +28,7 @@ static int generate_mount_unit(const char *pipefs_path, const char *pipefs_unit, {char *path;FILE *f; -size_t size = (strlen (dirname) +1 +strlen (pipefs_unit)); +size_t size = (strlen (dirname) +1 +strlen (pipefs_unit) +1 ); path =malloc (size);if (!path)
Signature · 1 line
2.36.1
Quoted 7 lines · Steve Dickson
Commit
7f8463fefixed a warning but introduce
a regression by not allocating enough space
for the pipefs-directory buffer when it is
not the default.
Committed....
steved.
Quoted 17 lines
--- systemd/rpc-pipefs-generator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)systemd/rpc-pipefs-generator.c +1
-1@@ -28,7 +28,7 @@ static int generate_mount_unit(const char *pipefs_path, const char *pipefs_unit, {char *path;FILE *f; -size_t size = (strlen (dirname) +1 +strlen (pipefs_unit)); +size_t size = (strlen (dirname) +1 +strlen (pipefs_unit) +1 ); path =malloc (size);if (!path)