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

sprintf/strcpy in qzip.c #1

Open
wdoekes opened this issue Aug 21, 2020 · 0 comments
Open

sprintf/strcpy in qzip.c #1

wdoekes opened this issue Aug 21, 2020 · 0 comments

Comments

@wdoekes
Copy link
Member

wdoekes commented Aug 21, 2020

cc -g -O2 -fdebug-prefix-map=/build/qpress-1.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -DQLZ_MEMORY_SAFE -DQLZ_COMPRESSION_LEVEL=1 -DQLZ_STREAMING_BUFFER=1048576 -o qlzip1 qzip.c quicklz.c -Wl,-z,relro
qzip.c: In function 'main':
qzip.c:274:29: warning: '%d' directive output may be truncated writing between 1 and 11 bytes into a region of size between 0 and 1023 [-Wformat-truncation=]
                         "%s.%d", fn_buffer, getpid());
                             ^~
In file included from /usr/include/stdio.h:873,
                 from qzip.c:8:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: '__builtin___snprintf_chk' output between 3 and 1036 bytes into a destination of size 1024
   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        __bos (__s), __fmt, __va_arg_pack ());
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant