We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4840

Summary: Read of uninitialized memory in DXGI_LoadDLL
Product: SDL Reporter: Mathieu Eyraud <meyraud705>
Component: videoAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: sylvain.becker
Version: 2.0.10   
Hardware: All   
OS: Windows (All)   

Description Mathieu Eyraud 2019-10-21 11:40:44 UTC
In file src/video/windows/SDL_windowsvideo.c ( https://hg.libsdl.org/SDL/file/74ac66d0e8ca/src/video/windows/SDL_windowsvideo.c ):

Variable 'pDXGIFactory' is declared without an initial value on line 389;
Calling DXGI_LoadDLL on line 411;
Assuming that SDL_LoadObject succeed on line 348;
Assuming that SDL_LoadFunction fail on line 353 (CreateDXGI is NULL);
'pDXGIFactory' is read uninitialized on line 361.
Comment 1 Sylvain 2019-10-23 07:27:12 UTC
Thanks fixed in https://hg.libsdl.org/SDL/rev/fe327ab07b2e !