SDL_ttf .c patch

Hello,

I noticed that if you call
TTF_Font * TTF_OpenFont(const char *file, int ptsize);
with an inexisting “file” pathname, then SDL_ttf simply crashes.

Here is the gdb output:
Program received signal SIGSEGV, Segmentation fault.
0x0804ac6b in TTF_OpenFontIndexRW (src=0x0, freesrc=1, ptsize=16, index=0) at
SDL_ttf.c:244
244 position = SDL_RWtell(src);

I found there there where no check that for file existance, then here is the patch.

Can someone patch it official SDL_ttf ?

Luc-Olivier

-------------- next part --------------
A non-text attachment was scrubbed…
Name: SDL_ttf.c.patch
Type: text/x-patch
Size: 375 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20040703/80281842/attachment.bin
-------------- next part --------------
A non-text attachment was scrubbed…
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20040703/80281842/attachment.pgp