Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiler warning #1

Open
dansarie opened this issue Nov 30, 2021 · 0 comments
Open

Compiler warning #1

dansarie opened this issue Nov 30, 2021 · 0 comments
Assignees
Labels

Comments

@dansarie
Copy link
Owner

/home/travis/build/dansarie/SoCracked/sboxgates/state.c: In function ‘save_state’:

/home/travis/build/dansarie/SoCracked/sboxgates/state.c:99:38: warning: ‘.state’ directive writing 6 bytes into a region of size between 0 and 20 [-Wformat-overflow=]

   99 |   sprintf(name, "%d-%03d-%04d-%s-%08x.state", num_outputs, st.num_gates - 8, st.sat_metric, out,

      |                                      ^~~~~~

In file included from /usr/include/stdio.h:867,

                 from /usr/include/msgpack/object.h:14,

                 from /usr/include/msgpack.h:17,

                 from /home/travis/build/dansarie/SoCracked/sboxgates/state.c:24:

/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 27 and 53 bytes into a destination of size 40

   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,

      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

   37 |       __bos (__s), __fmt, __va_arg_pack ());

      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@dansarie dansarie added the bug label Nov 30, 2021
@dansarie dansarie self-assigned this Nov 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant