Hi Sam
In X11_CreateYUVOverlay hwdata->image will be accessed after it has been freed, causing undefined behavior. Exchanging two lines as shown in this patch will fix that problem: Regards, Bodo --HG-- branch : SDL-1.2
This commit is contained in:
parent
e0e5377a72
commit
94dc16b3a7
1 changed files with 1 additions and 1 deletions
|
@ -330,8 +330,8 @@ SDL_Overlay *X11_CreateYUVOverlay(_THIS, int width, int height, Uint32 format, S
|
|||
#ifdef PITCH_WORKAROUND
|
||||
if ( hwdata->image != NULL && hwdata->image->pitches[0] != (width*bpp) ) {
|
||||
/* Ajust overlay width according to pitch */
|
||||
XFree(hwdata->image);
|
||||
width = hwdata->image->pitches[0] / bpp;
|
||||
XFree(hwdata->image);
|
||||
hwdata->image = SDL_NAME(XvShmCreateImage)(GFX_Display, xv_port, format,
|
||||
0, width, height, yuvshm);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue