pbc icon indicating copy to clipboard operation
pbc copied to clipboard

possible buffer overflow

Open ilka-schulz opened this issue 4 years ago • 0 comments

make all makes gcc warn:

ecc/d_param.c: In function ‘d_out_str’:
ecc/d_param.c:89:22: warning: ‘%d’ directive writing between 1 and 10 bytes into a region of size 3 [-Wformat-overflow=]
   89 |     sprintf(s, "coeff%d", i);
      |                      ^~
ecc/d_param.c:89:16: note: directive argument in the range [0, 1073741822]
   89 |     sprintf(s, "coeff%d", i);
      |                ^~~~~~~~~
ecc/d_param.c:89:5: note: ‘sprintf’ output between 7 and 16 bytes into a destination of size 8
   89 |     sprintf(s, "coeff%d", i);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~

ilka-schulz avatar Feb 08 '22 13:02 ilka-schulz