Skip to content

Commit 8359cfc

Browse files
committed
Fix potential division by zero in DetectGrayscaleImage (#1696)
1 parent aac2938 commit 8359cfc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Src/StartMenu/StartMenuDLL/ItemManager.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ static void CreateAppResolver( void )
136136

137137
static bool DetectGrayscaleImage( const unsigned int *bits, int stride, int width, int height )
138138
{
139+
if (width==0 || height==0)
140+
return false;
139141
int transparent=0;
140142
for (int y=0;y<height;y++,bits+=stride)
141143
{

0 commit comments

Comments
 (0)