]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tool_formparse: fix variable may be used before its value is set
authorDaniel Stenberg <daniel@haxx.se>
Wed, 20 Jul 2022 21:33:59 +0000 (23:33 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 23 Jul 2022 11:39:13 +0000 (13:39 +0200)
Warning by icc

Closes #9179

src/tool_formparse.c

index dcd7a1337b02686340f4f723e2b48cd8ad8a4029..927d3c1492854e836bca1b3f7a15e7341225226e 100644 (file)
@@ -409,7 +409,7 @@ static int read_field_headers(struct OperationConfig *config,
   size_t pos = 0;
   bool incomment = FALSE;
   int lineno = 1;
-  char hdrbuf[999]; /* Max. header length + 1. */
+  char hdrbuf[999] = ""; /* Max. header length + 1. */
 
   for(;;) {
     int c = getc(fp);