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 - Read of uninitialized memory in DXGI_LoadDLL
Summary: Read of uninitialized memory in DXGI_LoadDLL
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 2.0.10
Hardware: All Windows (All)
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-21 11:40 UTC by Mathieu Eyraud
Modified: 2019-10-23 07:27 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 !