Signed-off-by: cherry530 <xuping33@huawei.com> (cherry picked from commit 58b1cf8b9b35faf706e430d96c85e9e8f1701baa)
14 lines
380 B
Diff
14 lines
380 B
Diff
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) {
|