summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-02-14 10:38:29 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-02-14 10:38:29 +0000
commitaea7594bf1905c8a883b19f3191adb2488e05dd3 (patch)
tree8fcfe261879a646a29b219181b3eaa9a80127921 /filter
parentef4f097d3e76b172d2556d52ffbf3f9468780d1f (diff)
check valid mnDstBitsPerPix before progressing
Change-Id: I77b8e882b537ab10b26fa021ef633c603bbd6562
Diffstat (limited to 'filter')
-rw-r--r--filter/source/graphicfilter/iras/iras.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/filter/source/graphicfilter/iras/iras.cxx b/filter/source/graphicfilter/iras/iras.cxx
index 3fb27e56e507..1cc6cd26f4be 100644
--- a/filter/source/graphicfilter/iras/iras.cxx
+++ b/filter/source/graphicfilter/iras/iras.cxx
@@ -105,6 +105,13 @@ bool RASReader::ReadRAS(Graphic & rGraphic)
if ( !mbStatus )
return false;
+ if (mnDstBitsPerPix != 1 &&
+ mnDstBitsPerPix != 8 &&
+ mnDstBitsPerPix != 24)
+ {
+ return false;
+ }
+
bool bPalette(false);
BitmapPalette aPalette;