hiredis/fix-memory-uninitialized-in-fuzz-testcase.patch
2023-08-22 10:08:50 +08:00

25 lines
627 B
Diff

From 28b80dc9143d3625b05e28debe77368d332e9bf6 Mon Sep 17 00:00:00 2001
Date: Tue, 22 Aug 2023 09:39:36 +0800
Subject: [PATCH] fix memory uninitialized in fuzz testcase
---
sds.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sds.c b/sds.c
index 21ecec0..8d0ec69 100644
--- a/sds.c
+++ b/sds.c
@@ -516,7 +516,7 @@ sds sdscatvprintf(sds s, const char *fmt, va_list ap) {
} else {
buflen = sizeof(staticbuf);
}
-
+ memset(buf, 0, buflen);
/* Try with buffers two times bigger every time we fail to
* fit the string in the current buffer size. */
while(1) {
--
2.33.0