Skip to content

Commit f64c550

Browse files
committed
Merge branch 'master' into dev
2 parents 26b4d62 + c76f4a0 commit f64c550

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

ChangeLog.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,16 @@ JPEG images. This was known to cause a buffer overflow when attempting to
8282
decompress some such images using `tjDecompressToYUV2()` or
8383
`tjDecompressToYUVPlanes()`.
8484

85+
11. Fixed an issue, detected by ASan, whereby attempting to losslessly
86+
transform a specially-crafted malformed JPEG image containing an
87+
extremely-high-frequency coefficient block (junk image data that could never be
88+
generated by a legitimate JPEG compressor) could cause the Huffman encoder's
89+
local buffer to be overrun. (Refer to 1.4.0[9] and 1.4beta1[15].) Given that
90+
the buffer overrun was fully contained within the stack and did not cause a
91+
segfault or other user-visible errant behavior, and given that the lossless
92+
transformer (unlike the decompressor) is not generally exposed to arbitrary
93+
data exploits, this issue did not likely pose a security risk.
94+
8595

8696
2.0.3
8797
=====

jchuff.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ dump_buffer(working_state *state)
453453
* scanning order-- 1, 8, 16, etc.), then this will produce an encoded block
454454
* larger than 200 bytes.
455455
*/
456-
#define BUFSIZE (DCTSIZE2 * 4)
456+
#define BUFSIZE (DCTSIZE2 * 8)
457457

458458
#define LOAD_BUFFER() { \
459459
if (state->free_in_buffer < BUFSIZE) { \

0 commit comments

Comments
 (0)