]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
curl: proto2num: make sure obuf is inited
authorDaniel Stenberg <daniel@haxx.se>
Mon, 4 Jul 2022 10:50:15 +0000 (12:50 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 4 Jul 2022 12:38:35 +0000 (14:38 +0200)
Detected by Coverity. CID 1507052.

Closes #9096

src/tool_paramhlp.c

index 188d6a1da5daead1fe8391cab4b7f917eec27330..71c738594da63bb77ce71cb2e61a7d0bc37bf155 100644 (file)
@@ -291,7 +291,7 @@ ParameterError proto2num(struct OperationConfig *config,
   char *buffer;
   const char *sep = ",";
   char *token;
-  char obuf[256];
+  char obuf[256] = "";
   size_t olen = sizeof(obuf);
   char *optr;
   struct sprotos const *pp;