diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-02-14 10:38:29 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-02-14 10:38:29 +0000 |
commit | aea7594bf1905c8a883b19f3191adb2488e05dd3 (patch) | |
tree | 8fcfe261879a646a29b219181b3eaa9a80127921 | |
parent | ef4f097d3e76b172d2556d52ffbf3f9468780d1f (diff) |
check valid mnDstBitsPerPix before progressing
Change-Id: I77b8e882b537ab10b26fa021ef633c603bbd6562
-rw-r--r-- | filter/source/graphicfilter/iras/iras.cxx | 7 |
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; |