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

Possible of use of uninitialised variables in BmpReadHeader(...) #4645

Closed
DorpsGek opened this issue Jun 15, 2011 · 2 comments
Closed

Possible of use of uninitialised variables in BmpReadHeader(...) #4645

DorpsGek opened this issue Jun 15, 2011 · 2 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay

Comments

@DorpsGek
Copy link
Member

Parody opened the ticket and wrote:

GCC 4.5 complains about the use of the struct BmpInfo info in BmpReadHeader(...). info->compression and info->palette_size are not being initialized, and I agree with that. This could lead to unpredictable behavior with corrupt or rigged BMP-files. The attached patch initializes these two to 0, which would at least lead to predictable behavior.

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/4645
@DorpsGek
Copy link
Member Author

Parody wrote:

It must be late. ;) Missed one more compiler warning in bmp.cpp, same category. Attached patch contains all three now.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/4645#comment10006

@DorpsGek
Copy link
Member Author

frosch closed the ticket.

Reason for closing: Fixed

in r22592 (just zeroing the whole struct)


This comment was imported from FlySpray: https://bugs.openttd.org/task/4645

@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay labels Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay
Projects
None yet
Development

No branches or pull requests

1 participant