[SDL] IMG_ReadXPMFromArray

Alvin Beach alvinbeach at gmail.com
Fri Dec 22 22:33:02 PST 2006


Hello,

I'm not sure if this is the correct list, but I cannot find an
SDL_image mailing-list.

I believe there is a bug in IMG_ReadXPMFromArray() in IMG_xpm.c.
IMG_ReadXPMFromArray(char **xpm) calls load_xpm(xpm, NULL). However,
in load_xpm(), calls:
   start = SDL_RWops(src);

But, src is NULL. This causes a segfault to occur.

I currently have to use SDL_image-1.2.4-16 which does not make this calls.

I have had this segfault occur in openSUSE 10.2 with
SDL_image-1.2.5-24. Both versions are supplied by openSUSE as rpms.

I see that in the SVN
(http://www.libsdl.org/cgi/viewvc.cgi/trunk/SDL_image/IMG_xpm.c?revision=2390&view=markup)
the SDL_RWops() has been replaced with SDL_RWtell(). Does anyone know
if SDL_RWtell() will segfault if a null pointer is passed to it?

I haven't tried installing the SVN version, but I thought I would ask
around if anyone else experiences a segfault when loading an XPM image
from an array (not a file).

One final note, I'm using SDL 1.2.11-22 as provided by openSUSE for v10.2.

Thank you,

Alvin




More information about the SDL mailing list