Sfoglia il codice sorgente

Fixed bug 4839 - Read of uninitialized memory in Win32_ResizeWindowShape
(Thanks!)

Sylvain Becker 5 anni fa
parent
commit
d5d34de4db
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  1. 1 0
      src/video/windows/SDL_windowsshape.c

+ 1 - 0
src/video/windows/SDL_windowsshape.c

@@ -34,6 +34,7 @@ Win32_CreateShaper(SDL_Window * window) {
     result->mode.mode = ShapeModeDefault;
     result->mode.parameters.binarizationCutoff = 1;
     result->userx = result->usery = 0;
+    result->hasshape = SDL_FALSE;
     result->driverdata = (SDL_ShapeData*)SDL_malloc(sizeof(SDL_ShapeData));
     ((SDL_ShapeData*)result->driverdata)->mask_tree = NULL;
     /* Put some driver-data here. */