-
-
Notifications
You must be signed in to change notification settings - Fork 83
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
Safe sprintf call #164
Comments
Issue Label Bot is not confident enough to auto-label this issue. See dashboard for more details. |
Hi @klebertarcisio, Yes, the compiler is starting to spit these warnings out now, as is the static analysis tool we're using. See: I'd also suggest I'm all for fixing these, however, what I'd rather see are things like this changed as a result of bug-fixes in that area of the code, rather than necessarily going through all of these things piecemeal. A lot of what you're identifying is code which has been there for many years, and although compilers are now getting smarter, the code itself isn't causing any problems. We will fix these, but I'd much rather see some of the issues blocking a 1.0 release looked at first: https://github.com/fvwmorg/fvwm3/projects/1?card_filter_query=milestone%3A1.0 |
Hi @klebertarcisio, Now that things have started to settle -- can you revisit this? |
Hi @ThomasAdam, yes, I can do it! |
I hope you're well. Just checking to see if you think you'll be able to look at this issue soon? If not, I'll close this and move this in to the TODO list. No pressure -- just trying to do some project maintenance. |
Hi @ThomasAdam, sorry for my delay. I create a pull request about this issue. Here |
Hi everyone,
I would like to know what do you think about these sprintf calls:
fvwm3/modules/FvwmIdent/FvwmIdent.c
Lines 1332 to 1335 in 48dd509
In this case, x and y are integer variables, but max_aspect is a char of just 11 bytes.
See this toy example:
sprintf (mymin_aspect, "% d % d", 111111, 111111);
In this case, we have an overflow. Should the mymin_aspect variable be 24 bytes?
fvwm3/libs/Colorset.c
Lines 111 to 120 in 48dd509
In this case, csetbuf is a char of just 256 bytes, but the operation requires 270 bytes.
fvwm3/fvwm/icccm2.c
Line 56 in 48dd509
In this case, wm_sx is a char of just 20 bytes, but the operation requires 25 bytes.
Regards
The text was updated successfully, but these errors were encountered: