diff options
author | Vadim ProductEngine <vsavchuk@productengine.com> | 2011-04-08 02:25:32 +0300 |
---|---|---|
committer | Vadim ProductEngine <vsavchuk@productengine.com> | 2011-04-08 02:25:32 +0300 |
commit | a84c8e0704e363a9b24f3ee56760178267086793 (patch) | |
tree | b6a3284f10767c801f89fed54becc0efcc02f949 /indra/llimage/llimagedimensionsinfo.h | |
parent | b5c834c6fdcee7d7238bebfc561ecee3ecca3589 (diff) |
STORM-1118 FIXED STORM-1118 Viewer crashes when user tries to upload image without JFIF header.
* Added checks for image file contents not matching the file extension (e.g. a bitmap named file.jpg).
* Added checks for abnormally short files to avoid crashes when parsing them.
Diffstat (limited to 'indra/llimage/llimagedimensionsinfo.h')
-rw-r--r-- | indra/llimage/llimagedimensionsinfo.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/indra/llimage/llimagedimensionsinfo.h b/indra/llimage/llimagedimensionsinfo.h index 5384faf3f4..382fdb2a0e 100644 --- a/indra/llimage/llimagedimensionsinfo.h +++ b/indra/llimage/llimagedimensionsinfo.h @@ -119,6 +119,9 @@ protected: return read_byte() << 8 | read_byte(); } + /// Check if the file is not shorter than min_len bytes. + bool checkFileLength(S32 min_len); + protected: LLAPRFile mInfile ; std::string mSrcFilename; |