Closed
Description
Unfortunately, #7490 caused scan-build to yell:
cookie_interface.c: In function ‘main’:
cookie_interface.c:96:53: error: ‘%.0lf’ directive output may be truncated writing between 1 and 310 bytes into a region of size 230 [-Werror=format-truncation=]
snprintf(nline, sizeof(nline), "%s\t%s\t%s\t%s\t%.0lf\t%s\t%s",
^~~~~
cookie_interface.c:96:5: note: ‘snprintf’ output between 70 and 379 bytes into a destination of size 256
snprintf(nline, sizeof(nline), "%s\t%s\t%s\t%s\t%.0lf\t%s\t%s",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
".example.com", "TRUE", "/", "FALSE",
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
difftime(time(NULL) + 31337, (time_t)0),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"PREF", "hello example, i like you very much!");
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
_Originally posted by @bagder in https://github.com/curl/curl/pull/7490#issuecomment-886606852_