Skip to contentSkip to conversation

main - gcc: snprintf may need here upto 18 bytes

PATCH Zdenek Kabelac 1 participant 1 message Jan 26, 2022

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=cf68bf7b6c5668dcaf16310e84636a79164bd8ee
Commit:        cf68bf7b6c5668dcaf16310e84636a79164bd8ee
Parent:        7f1f7ad694201533c04ddfbe9ba047f832b38750
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Thu Jan 20 15:24:09 2022 +0100
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Wed Jan 26 15:09:58 2022 +0100

gcc: snprintf may need here upto 18 bytes

Although hypothetical case....

---
 daemons/lvmlockd/lvmlockd-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
daemons/lvmlockd/lvmlockd-core.c +1 -1
index 175f59331..6d0d4d98c 100644
@@ -4777,7 +4777,7 @@ static void client_recv_action(struct client *cl)
 	const char *path;
 	const char *str;
 	struct pvs pvs;
-	char buf[17];	/* "path[%d]\0", %d outputs signed integer so max to 10 bytes */
+	char buf[18];	/* "path[%d]\0", %d outputs signed integer so max to 10 bytes */
 	int64_t val;
 	uint32_t opts = 0;
 	int result = 0;