pbc
pbc copied to clipboard
possible buffer overflow
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);
| ^~~~~~~~~~~~~~~~~~~~~~~~