diff options
author | Eirik Aavitsland <eirik.aavitsland@qt.io> | 2019-10-23 16:30:29 +0200 |
---|---|---|
committer | Eirik Aavitsland <eirik.aavitsland@qt.io> | 2019-10-25 14:33:11 +0200 |
commit | f3dbe98dca58731ff98dff3cc9111a8252f8e1e6 (patch) | |
tree | db3f7655ac00bce2766ea7d6c2b0ebf23b1c3dc4 /src/3rdparty/libjpeg/src/jdhuff.c | |
parent | 2fac76e719fcc3889441af08e71c2decb106676a (diff) |
Update bundled libjpeg-turbo to version 2.0.3
[ChangeLog][Third-Party Code] libjpeg-turbo was updated to version 2.0.3
Task-number: QTBUG-79420
Change-Id: I9f9b8b3a913fd5843759c0610f43b22c5bee67dc
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/3rdparty/libjpeg/src/jdhuff.c')
-rw-r--r-- | src/3rdparty/libjpeg/src/jdhuff.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/3rdparty/libjpeg/src/jdhuff.c b/src/3rdparty/libjpeg/src/jdhuff.c index 95f38e547e..a1128178b0 100644 --- a/src/3rdparty/libjpeg/src/jdhuff.c +++ b/src/3rdparty/libjpeg/src/jdhuff.c @@ -4,7 +4,7 @@ * This file was part of the Independent JPEG Group's software: * Copyright (C) 1991-1997, Thomas G. Lane. * libjpeg-turbo Modifications: - * Copyright (C) 2009-2011, 2016, 2018, D. R. Commander. + * Copyright (C) 2009-2011, 2016, 2018-2019, D. R. Commander. * For conditions of distribution and use, see the accompanying README.ijg * file. * @@ -589,7 +589,11 @@ decode_mcu_slow(j_decompress_ptr cinfo, JBLOCKROW *MCU_data) if (entropy->dc_needed[blkn]) { /* Convert DC difference to actual value, update last_dc_val */ int ci = cinfo->MCU_membership[blkn]; - s += state.last_dc_val[ci]; + /* This is really just + * s += state.last_dc_val[ci]; + * It is written this way in order to shut up UBSan. + */ + s = (int)((unsigned int)s + (unsigned int)state.last_dc_val[ci]); state.last_dc_val[ci] = s; if (block) { /* Output the DC coefficient (assumes jpeg_natural_order[0] = 0) */ @@ -684,7 +688,7 @@ decode_mcu_fast(j_decompress_ptr cinfo, JBLOCKROW *MCU_data) if (entropy->dc_needed[blkn]) { int ci = cinfo->MCU_membership[blkn]; - s += state.last_dc_val[ci]; + s = (int)((unsigned int)s + (unsigned int)state.last_dc_val[ci]); state.last_dc_val[ci] = s; if (block) (*block)[0] = (JCOEF)s; |