Fix potential division by zero in DetectGrayscaleImage (#1696)

This commit is contained in:
ge0rdi
2023-09-13 10:02:43 +02:00
parent aac293832c
commit 8359cfcc81

View File

@@ -136,6 +136,8 @@ static void CreateAppResolver( void )
static bool DetectGrayscaleImage( const unsigned int *bits, int stride, int width, int height )
{
if (width==0 || height==0)
return false;
int transparent=0;
for (int y=0;y<height;y++,bits+=stride)
{