summaryrefslogtreecommitdiff
path: root/indra/llimage/llimagedimensionsinfo.h
diff options
context:
space:
mode:
authorVadim ProductEngine <vsavchuk@productengine.com>2011-04-08 02:25:32 +0300
committerVadim ProductEngine <vsavchuk@productengine.com>2011-04-08 02:25:32 +0300
commita84c8e0704e363a9b24f3ee56760178267086793 (patch)
treeb6a3284f10767c801f89fed54becc0efcc02f949 /indra/llimage/llimagedimensionsinfo.h
parentb5c834c6fdcee7d7238bebfc561ecee3ecca3589 (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.h3
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;