hiredis/fix-memory-uninitialized-in-fuzz-testcase.patch

14 lines
380 B
Diff
Raw Normal View History

diff --git a/sds.c b/sds.c
index 49d2096..9d46dc4 100644
--- a/sds.c
+++ b/sds.c
@@ -513,7 +513,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) {