This is a two part fix.
Part 1: If given a text file which has the first two characters as "BM",
Fl_BMP_Image will attempt to load that file as a valid bitmap file. Depending on what is in the text file,
Fl_BMP_Image will crash in various ways.
The fix is to verify the existence of some required attributes of a valid Bitmap header and set the file's
Part 2: Having fixed the above bug, I then discovered that
Fl_Shared_Image did not check the
fail() state, and proceeded to act as if the invalid
Fl_BMP_Image was in fact valid.
The fix here is to check the
fail() state: in a failure situation, delete the invalid object, and continue iterating through the image handlers.
You can view, comment on, or merge this pull request online at:
- Fix BMP loading bug; fix problem accepting invalid image
[ Direct Link to Message ]
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.