Skip to content

Commit 75c40d0

Browse files
authored
[GEN][ZH] Prevent using uninitialized memory 'locked_rects' in TextureLoader::Load_Thumbnail() (#1129)
1 parent 1fbfbe7 commit 75c40d0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Generals/Code/Libraries/Source/WWVegas/WW3D2/textureloader.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ IDirect3DTexture8* TextureLoader::Load_Thumbnail(const StringClass& filename,WW3
199199
MIP_LEVELS_ALL);
200200

201201
unsigned level=0;
202-
D3DLOCKED_RECT locked_rects[12];
202+
D3DLOCKED_RECT locked_rects[12]={0};
203203
WWASSERT(d3d_texture->GetLevelCount()<=12);
204204

205205
// Lock all surfaces

GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/textureloader.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ IDirect3DTexture8* TextureLoader::Load_Thumbnail(const StringClass& filename, co
452452
#endif
453453

454454
unsigned level=0;
455-
D3DLOCKED_RECT locked_rects[12];
455+
D3DLOCKED_RECT locked_rects[12]={0};
456456
WWASSERT(sysmem_texture->GetLevelCount()<=12);
457457

458458
// Lock all surfaces

0 commit comments

Comments
 (0)