We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 2454 - Crash when loading some XPM files
Summary: Crash when loading some XPM files
Status: RESOLVED FIXED
Alias: None
Product: SDL_image
Classification: Unclassified
Component: misc (show other bugs)
Version: unspecified
Hardware: x86 Linux
: P2 critical
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-19 21:12 UTC by Jeff Pohlmeyer
Modified: 2014-04-18 06:32 UTC (History)
0 users

See Also:


Attachments
Malformed XPM test file (1.96 KB, image/x-xpixmap)
2014-03-19 21:12 UTC, Jeff Pohlmeyer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff Pohlmeyer 2014-03-19 21:12:39 UTC
Created attachment 1595 [details]
Malformed XPM test file

The attached XPM file causes a segfault in the "showimage" test program.

Tested on ArchLinux i686, crash occurs with both SDL_image-1.2.12 and SDL2_image-2.0.0

I'm setting the severity to "critical" because this may potentially be an exploitable buffer overrun, but that's purely speculation.
Comment 1 Sam Lantinga 2014-04-18 06:32:34 UTC
This wasn't a buffer overflow, just a missing NULL check.
Fixed, thanks!
https://hg.libsdl.org/SDL_image/rev/ee17b8eb58ce