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

tl-parser/tl-parser.c:1907:9: note: 'sprintf' output between 2 and 21 bytes into a destination of size 20 #148

Open
ColumPaget opened this issue Jun 1, 2021 · 1 comment

Comments

@ColumPaget
Copy link

My compiler borked at the below (sorry if anyone else has reported this, I did scan the issues list and couldn't see any matches).

Fixed by increasing buffer size from 20 to 40.

gcc -I. -I. -g -O2 -I/usr/local/include -I/usr/include -I/usr/include -DHAVE_CONFIG_H -Wall -Wextra -Werror -Wno-deprecated-declarations -fno-strict-aliasing -fno-omit-frame-pointer -ggdb -Wno-unused-parameter -fPIC -c -MP -MD -MF dep/crypto/err_altern.d -MQ objs/crypto/err_altern.o -o objs/crypto/err_altern.o crypto/err_altern.c
tl-parser/tl-parser.c: In function 'tl_parse_args134':
tl-parser/tl-parser.c:1907:26: error: 'sprintf' may write a terminating nul past the end of the destination [-Werror=format-overflow=]
sprintf (s, "%lld", lrand48 () * (1ll << 32) + lrand48 ());
^
tl-parser/tl-parser.c:1907:9: note: 'sprintf' output between 2 and 21 bytes into a destination of size 20
sprintf (s, "%lld", lrand48 () * (1ll << 32) + lrand48 ());

@dl7ata
Copy link

dl7ata commented Sep 11, 2022

Same here. Any solution meanwhile?
Running Pi 4 with 4GB RAM and
Linux bla 5.10.103-v7l+ #1529 SMP Tue Mar 8 12:24:00 GMT 2022 armv7l GNU/Li

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

2 participants