FS#39071 - [sdl_ttf] memory corruption in SDL_ttf

Attached to Project: Arch Linux
Opened by Christian Bielert (cib) - Friday, 28 February 2014, 01:40 GMT
Last edited by Jan Alexander Steffens (heftig) - Friday, 28 February 2014, 20:54 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jan de Groot (JGC)
Jan Alexander Steffens (heftig)
Architecture i686
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Attached is a simple 13 line C program that causes the crash to happen. I tested the program on two separate arch linux machines, and could reproduce the crash on both machines. I tested it on a Debian VM, and the crash did not occur there.

Compile with:

gcc -I /usr/include/SDL/ -lSDL -lSDL_ttf reproduce_SDL_ttf_bug.c -o test

You can also compile with -I /usr/include/SDL2/ -lSDL2 -lSDL2_ttf, the same thing will happen.

Detailed crash log can be found in the attached archive.
This task depends upon

Closed by  Jan Alexander Steffens (heftig)
Friday, 28 February 2014, 20:54 GMT
Reason for closing:  Upstream
Additional comments about closing:  Freetype bug, will be fixed in 2.5.3.
Comment by Christian Bielert (cib) - Friday, 28 February 2014, 01:41 GMT
reproduce_SDL_ttf_bug.c
-----------------------

#include "SDL.h"
#include "SDL_ttf.h"

int main() {
SDL_Init(0);
TTF_Init();
TTF_Font* fnt = TTF_OpenFontIndex("terminus.fon", 15, 0);
if(fnt != NULL) {
TTF_CloseFont(fnt);
fnt = NULL;
}
}
Comment by Christian Bielert (cib) - Friday, 28 February 2014, 01:42 GMT
Import detail I forgot to mention: This only happens with the "terminus.fon" in the attached archive. Other fonts may yield different results.
Comment by Jan de Groot (JGC) - Friday, 28 February 2014, 11:58 GMT Comment by Christian Bielert (cib) - Friday, 28 February 2014, 15:18 GMT
Thanks, didn't think to check the freetype bugtracker itself rather than SDL_ttf. Switching to freetype2-git from the AUR fixes the issue for me.

Loading...