Pārlūkot izejas kodu

Fixed invalid read in yuv_rgb_sse() (see bug #5430)

Sylvain Becker 4 gadi atpakaļ
vecāks
revīzija
f5eba2ccd6
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 2 2
      src/render/SDL_yuv_sw.c

+ 2 - 2
src/render/SDL_yuv_sw.c

@@ -84,7 +84,7 @@ SDL_SW_CreateYUVTexture(Uint32 format, int w, int h)
                 SDL_assert(0 && "We should never get here (caught above)");
                 break;
         }
-        swdata->pixels = (Uint8 *) SDL_malloc(dst_size);
+        swdata->pixels = (Uint8 *) SDL_SIMDAlloc(dst_size);
         if (!swdata->pixels) {
             SDL_SW_DestroyYUVTexture(swdata);
             SDL_OutOfMemory();
@@ -439,7 +439,7 @@ void
 SDL_SW_DestroyYUVTexture(SDL_SW_YUVTexture * swdata)
 {
     if (swdata) {
-        SDL_free(swdata->pixels);
+        SDL_SIMDFree(swdata->pixels);
         SDL_FreeSurface(swdata->stretch);
         SDL_FreeSurface(swdata->display);
         SDL_free(swdata);