Author
anonymous
almost 8 years ago
Language
Compiler
Options
Author
anonymous
almost 8 years ago
$ prog.c: In function 'str_copy':
prog.c:93:21: warning: '%lu' directive writing between 1 and 20 bytes into a region of size between 13 and 32 [-Wformat-overflow=]
sprintf(errmes, "string copy failed : source length %lu > \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dest allocated space %lu\n", (unsigned long)sourcelen, \
~~~~~~~~~~~~~~~~~~~~~~~~~~~
prog.c:93:5: note: 'sprintf' output between 71 and 109 bytes into a destination of size 100
sprintf(errmes, "string copy failed : source length %lu > \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dest allocated space %lu\n", (unsigned long)sourcelen, \
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(unsigned long)dest->size);
~~~~~~~~~~~~~~~~~~~~~~~~~~
prog.c: In function 'str_cat':
prog.c:116:21: warning: '%lu' directive writing between 1 and 20 bytes into a region of size between 9 and 28 [-Wformat-overflow=]
sprintf(errmes, "string concatenation failed : source length %lu > \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dest free space %lu\n", (unsigned long)sourcelen, \
~~~~~~~~~~~~~~~~~~~~~~
prog.c:116:5: note: 'sprintf' output between 75 and 113 bytes into a destination of size 100
sprintf(errmes, "string concatenation failed : source length %lu > \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dest free space %lu\n", (unsigned long)sourcelen, \
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(unsigned long)destfree);
~~~~~~~~~~~~~~~~~~~~~~~~
content-type: text/html
Exit Code:
0