From: Daniel Stenberg Date: Mon, 26 Jul 2021 12:27:45 +0000 (+0200) Subject: example/cookie_interface: fix scan-build printf warning X-Git-Tag: curl-7_79_0~171 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=17c7a56d14878601d5ea722ef7917e515640b4d7;p=thirdparty%2Fcurl.git example/cookie_interface: fix scan-build printf warning Follow-up to 4b79c4fb565 Fixes #7497 Closes #7498 --- diff --git a/docs/examples/cookie_interface.c b/docs/examples/cookie_interface.c index fb2b9fb7ce..fb76ae927d 100644 --- a/docs/examples/cookie_interface.c +++ b/docs/examples/cookie_interface.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2020, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2021, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -69,7 +69,7 @@ main(void) curl_global_init(CURL_GLOBAL_ALL); curl = curl_easy_init(); if(curl) { - char nline[256]; + char nline[512]; curl_easy_setopt(curl, CURLOPT_URL, "https://www.example.com/"); curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); @@ -93,7 +93,7 @@ main(void) #define snprintf _snprintf #endif /* Netscape format cookie */ - snprintf(nline, sizeof(nline), "%s\t%s\t%s\t%s\t%.0lf\t%s\t%s", + snprintf(nline, sizeof(nline), "%s\t%s\t%s\t%s\t%.0f\t%s\t%s", ".example.com", "TRUE", "/", "FALSE", difftime(time(NULL) + 31337, (time_t)0), "PREF", "hello example, i like you very much!");