aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/libwmf/files/patch-rh1227243-CVE-2015-0848
blob: 45e5caa662981a63b7682bd2e195fc192b166a3d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- src/ipa/ipa/bmp.h   2015-06-02 11:35:04.072201795 +0100
+++ src/ipa/ipa/bmp.h   2015-06-02 11:35:20.647406414 +0100
@@ -1145,8 +1143,15 @@
        }
    }
    else
-   {   /* Convert run-length encoded raster pixels. */
-       DecodeImage (API,bmp,src,(unsigned int) bmp_info.compression,data->image);
+   {
+       if (bmp_info.bits_per_pixel == 8)   /* Convert run-length encoded raster pixels. */
+       {
+           DecodeImage (API,bmp,src,(unsigned int) bmp_info.compression,data->image);
+       }
+       else
+       {   WMF_ERROR (API,"Unexpected pixel depth");
+           API->err = wmf_E_BadFormat;
+       }
    }
 
    if (ERR (API))