mirror of
https://github.com/Open-Shell/Open-Shell-Menu.git
synced 2026-04-17 13:23:04 +10:00
Fix potential division by zero in DetectGrayscaleImage (#1696)
This commit is contained in:
@@ -136,6 +136,8 @@ static void CreateAppResolver( void )
|
|||||||
|
|
||||||
static bool DetectGrayscaleImage( const unsigned int *bits, int stride, int width, int height )
|
static bool DetectGrayscaleImage( const unsigned int *bits, int stride, int width, int height )
|
||||||
{
|
{
|
||||||
|
if (width==0 || height==0)
|
||||||
|
return false;
|
||||||
int transparent=0;
|
int transparent=0;
|
||||||
for (int y=0;y<height;y++,bits+=stride)
|
for (int y=0;y<height;y++,bits+=stride)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user