"Fossies" - the Fresh Open Source Software Archive 
Member "qt-everywhere-src-6.3.1/qtwebengine/src/3rdparty/chromium/third_party/libpng/patches/0001-chunkerror.patch" (8 Jun 2022, 1839 Bytes) of package /linux/misc/qt-everywhere-src-6.3.1.tar.xz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Diff source code syntax highlighting (style:
standard) with prefixed line numbers.
Alternatively you can here
view or
download the uninterpreted source code file.
1 From e87a02987101e2dbe319a4aba6b52470f7624b4a Mon Sep 17 00:00:00 2001
2 From: Leon Scroggins III <scroggo@google.com>
3 Date: Wed, 18 Apr 2018 21:45:46 +0000
4 Subject: [PATCH] Turn large PNG chunks into benign errors
5
6 Bug: 827754
7
8 A recent change to libpng [1] (included in Chromium with the recent
9 libpng update [2]) turns chunks that are bigger than
10 PNG_USER_CHUNK_MALLOC_MAX into failures. Although this matches the
11 intent of PNG_USER_CHUNK_MALLOC_MAX, it also causes images which used to
12 be viewable in Chromium to fail. Changing to a benign error allows us to
13 display these images once again. Though it means we do allow libpng to
14 allocate more than PNG_USER_CHUNK_MALLOC_MAX, it matches the behavior
15 prior to [2] (when we were using 1.6.22), and it does not regress
16 crbug.com/117369
17
18 Add a regression test. The image is supplied in the bug, and has approval
19 to be checked in [3].
20
21 [1] https://github.com/glennrp/libpng/commit/347538efbdc21b8df684ebd92d37400b3ce85d55
22 [2] https://chromium.googlesource.com/chromium/src/+/f82653a473f8de5fc86d0f2ecc75f6237e61946b
23 [3] https://bugs.chromium.org/p/chromium/issues/detail?id=827754#c15
24
25 Change-Id: Iaae884b42a94bdec6e1cfad97d46ef820a75a5f8
26 Reviewed-on: https://chromium-review.googlesource.com/1014027
27 Commit-Queue: Leon Scroggins <scroggo@chromium.org>
28 Reviewed-by: Noel Gordon <noel@chromium.org>
29 Cr-Commit-Position: refs/heads/master@{#551838}
30 ---
31
32 diff --git a/third_party/libpng/pngrutil.c b/third_party/libpng/pngrutil.c
33 index 8692933..2210ffc 100644
34 --- a/third_party/libpng/pngrutil.c
35 +++ b/third_party/libpng/pngrutil.c
36 @@ -3165,7 +3165,7 @@
37 {
38 png_debug2(0," length = %lu, limit = %lu",
39 (unsigned long)length,(unsigned long)limit);
40 - png_chunk_error(png_ptr, "chunk data is too large");
41 + png_benign_error(png_ptr, "chunk data is too large");
42 }
43 }
44