From a84c8e0704e363a9b24f3ee56760178267086793 Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Fri, 8 Apr 2011 02:25:32 +0300 Subject: 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. --- indra/llimage/llimagedimensionsinfo.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/llimage/llimagedimensionsinfo.h') 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; -- cgit v1.2.3