]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
synctime: fix use of uninitialized buffer on non-Windows
authorDaniel Stenberg <daniel@haxx.se>
Tue, 3 Mar 2026 22:11:51 +0000 (23:11 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 6 Mar 2026 21:49:03 +0000 (22:49 +0100)
Follow-up to: b714c674f3

Spotted by Codex Security
Closes #20806

docs/examples/synctime.c

index 48751b92c9bdd19aa2dd2d43b40ff64c8783c072..32b06d3bc13c54ba33bf59a6eb356a826f724a59 100644 (file)
@@ -274,7 +274,7 @@ int main(int argc, const char *argv[])
     time_t tt_gmt;
     double tzonediffFloat;
     int tzonediffWord;
-    char timeBuf[61];
+    char timeBuf[61] = "";
     char tzoneBuf[16];
 
     SyncTime_CURL_Init(curl, conf.http_proxy, conf.proxy_user);