Linux NFS development
 help / color / mirror / Atom feed
* [PATCH] rpc-pipefs-generator: allocate enough space for pipefs-directory buffer
@ 2022-07-21 19:18 Steve Dickson
  2022-07-22 15:02 ` Steve Dickson
  0 siblings, 1 reply; 2+ messages in thread
From: Steve Dickson @ 2022-07-21 19:18 UTC (permalink / raw)
  To: Linux NFS Mailing list

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.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2106896
Signed-off-by: Steve Dickson <steved@redhat.com>
---
 systemd/rpc-pipefs-generator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/systemd/rpc-pipefs-generator.c b/systemd/rpc-pipefs-generator.c
index 7b2bb4f7..3aaeaeaf 100644
--- a/systemd/rpc-pipefs-generator.c
+++ b/systemd/rpc-pipefs-generator.c
@@ -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)
-- 
2.36.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-07-22 15:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-21 19:18 [PATCH] rpc-pipefs-generator: allocate enough space for pipefs-directory buffer Steve Dickson
2022-07-22 15:02 ` Steve Dickson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox