Commit c9d0e2ae0ae43f32f55061401b509807f7440c97

Sylvain Becker 2019-10-23T09:26:27

Fixed bug 4840 - Read of uninitialized memory in DXGI_LoadDLL (Thanks!)

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/video/windows/SDL_windowsvideo.c b/src/video/windows/SDL_windowsvideo.c
index 11bd23f..cba1ea5 100644
--- a/src/video/windows/SDL_windowsvideo.c
+++ b/src/video/windows/SDL_windowsvideo.c
@@ -386,7 +386,7 @@ SDL_DXGIGetOutputInfo(int displayIndex, int *adapterIndex, int *outputIndex)
     void *pDXGIDLL;
     char *displayName;
     int nAdapter, nOutput;
-    IDXGIFactory *pDXGIFactory;
+    IDXGIFactory *pDXGIFactory = NULL;
     IDXGIAdapter *pDXGIAdapter;
     IDXGIOutput* pDXGIOutput;