Go to file
Thiago Macieira a55f36211e Fix the JPEG EXIF reader to deal with some broken/corrupt files
We parse the EXIF header in order to get the proper orientation, so
let's be a bit more careful in what we accept. This patch adds better
handling for reading past the end of the stream, plus it limits the
number of IFDs read (to avoid processing too much data) and deals with a
pathological case of the EXIF file format: EXIF (due to its TIFF
origins) permits the offset to the next IFD to be backwards in the file,
which means it could result in a loop or pointing to plain corrupt data.
We disallow any backwards pointers, since it seems that's what other
decoders do (libexif, for example).

Change-Id: Iaeecaffe26af4535b416fffd1489332db92e3888
(cherry picked from 5.6 commit 02150649f95b8f46f826e6e002be3fa0b6d009bc)
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2016-12-01 08:17:04 +00:00
bin Merge remote-tracking branch 'origin/5.6' into 5.7 2016-09-28 11:51:35 +02:00
config.tests Merge remote-tracking branch 'origin/5.6' into 5.7 2016-09-16 23:16:25 +02:00
dist Add changes file for 5.7.1 2016-11-03 05:12:00 +00:00
doc Merge remote-tracking branch 'origin/5.6' into 5.7 2016-10-01 22:15:55 +02:00
examples Merge remote-tracking branch 'origin/5.6' into 5.7 2016-09-16 23:16:25 +02:00
lib Purge all fonts 2015-08-18 19:59:14 +00:00
mkspecs qmake: fix installation of asset catalog files 2016-11-17 19:34:21 +00:00
qmake Merge remote-tracking branch 'origin/5.6' into 5.7 2016-10-01 22:15:55 +02:00
src Fix the JPEG EXIF reader to deal with some broken/corrupt files 2016-12-01 08:17:04 +00:00
tests Fix the JPEG EXIF reader to deal with some broken/corrupt files 2016-12-01 08:17:04 +00:00
tools configure: Determine MSVC version by evaluating macro _MSC_FULL_VER 2016-10-31 05:03:45 +00:00
util Re-generate QLocale data from CLDR v29 2016-04-08 03:51:18 +00:00
.gitattributes Update the git-archive export options 2012-09-07 15:39:31 +02:00
.gitignore Update gitignore 2016-08-19 10:43:26 +00:00
.qmake.conf Bump version 2016-07-28 13:50:04 +02:00
.tag Update the git-archive export options 2012-09-07 15:39:31 +02:00
configure Merge remote-tracking branch 'origin/5.6' into 5.7 2016-08-29 08:13:40 +02:00
configure.bat Don't compile configure.exe with clang-cl.exe if cl.exe is available 2016-07-21 00:16:04 +00:00
header.BSD Add new license header templates and license files 2016-01-14 20:43:46 +00:00
header.BSD-OLD Add new license header templates and license files 2016-01-14 20:43:46 +00:00
header.COMM Add header template for commercial only modules 2015-10-19 10:37:18 +00:00
header.FDL Add new license header templates and license files 2016-01-14 20:43:46 +00:00
header.FDL-OLD Add new license header templates and license files 2016-01-14 20:43:46 +00:00
header.GPL Add new license header templates and license files 2016-01-14 20:43:46 +00:00
header.GPL-EXCEPT Add new license header templates and license files 2016-01-14 20:43:46 +00:00
header.LGPL Add new license header templates and license files 2016-01-14 20:43:46 +00:00
header.LGPL3 Update copyright headers 2015-02-11 06:49:51 +00:00
header.LGPL3-COMM Update copyright headers 2015-02-11 06:49:51 +00:00
header.LGPL21 Update copyright headers 2015-02-11 06:49:51 +00:00
header.LGPL-NOGPL2 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
header.LGPL-ONLY Update copyright headers 2015-02-11 06:49:51 +00:00
INSTALL Doc: Update links in INSTALL file 2015-02-16 09:06:41 +00:00
LGPL_EXCEPTION.txt Update copyright headers 2015-02-11 06:49:51 +00:00
LICENSE.FDL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LICENSE.GPL2 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.GPL3 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.GPL3-EXCEPT Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.GPLv3 Expand license scope from "Qt GUI Toolkit" to "Qt Toolkit" 2016-06-15 07:02:32 +00:00
LICENSE.LGPL3 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.LGPLv3 Expand license scope from "Qt GUI Toolkit" to "Qt Toolkit" 2016-06-15 07:02:32 +00:00
LICENSE.LGPLv21 Expand license scope from "Qt GUI Toolkit" to "Qt Toolkit" 2016-06-15 07:02:32 +00:00
LICENSE.PREVIEW.COMMERCIAL Add new license header templates and license files 2016-01-14 20:43:46 +00:00
qtbase.pro Merge remote-tracking branch 'origin/5.6' into 5.7 2016-10-01 22:15:55 +02:00
sync.profile make a proper header-only module for QtZlib 2015-11-17 20:22:17 +00:00