14 lines
829 B
Diff
14 lines
829 B
Diff
diff -rupN --no-dereference freeimage-svn-r1909-FreeImage-trunk/Source/FreeImage/PluginICO.cpp freeimage-svn-r1909-FreeImage-trunk-new/Source/FreeImage/PluginICO.cpp
|
|
--- freeimage-svn-r1909-FreeImage-trunk/Source/FreeImage/PluginICO.cpp 2023-09-28 19:34:45.524031668 +0200
|
|
+++ freeimage-svn-r1909-FreeImage-trunk-new/Source/FreeImage/PluginICO.cpp 2023-09-28 19:34:47.717009813 +0200
|
|
@@ -301,6 +301,9 @@ LoadStandardIcon(FreeImageIO *io, fi_han
|
|
int width = bmih.biWidth;
|
|
int height = bmih.biHeight / 2; // height == xor + and mask
|
|
unsigned bit_count = bmih.biBitCount;
|
|
+ if (bit_count != 1 && bit_count != 2 && bit_count != 4 && bit_count != 8 && bit_count != 16 && bit_count != 24 && bit_count != 32) {
|
|
+ return NULL;
|
|
+ }
|
|
unsigned line = CalculateLine(width, bit_count);
|
|
unsigned pitch = CalculatePitch(line);
|
|
|