summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qppmhandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/image/qppmhandler.cpp')
-rw-r--r--src/gui/image/qppmhandler.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/image/qppmhandler.cpp b/src/gui/image/qppmhandler.cpp
index e9f5a905f0..53e3fa293d 100644
--- a/src/gui/image/qppmhandler.cpp
+++ b/src/gui/image/qppmhandler.cpp
@@ -115,7 +115,7 @@ static bool read_pbm_header(QIODevice *device, char& type, int& w, int& h, int&
else
mcc = read_pbm_int(device); // get max color component
- if (w <= 0 || w > 32767 || h <= 0 || h > 32767 || mcc <= 0)
+ if (w <= 0 || w > 32767 || h <= 0 || h > 32767 || mcc <= 0 || mcc > 0xffff)
return false; // weird P.M image
return true;