Skip to content

possible buffer overflow #28

@ilka-schulz

Description

@ilka-schulz

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);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions