commit | c4bd411c35290f9568da44a7faf7a09505db78db | [log] [tgz] |
---|---|---|
author | Qiang Zhou <nju04zq@gmail.com> | Thu Dec 19 18:33:21 2019 +0800 |
committer | Cosmin Truta <ctruta@gmail.com> | Sat Mar 13 02:10:50 2021 -0500 |
tree | 210e4e5be898d8276aa4b707cb3789b3cab2d7bc | |
parent | 2224c8ea7b901ba038fdeff13605a60563bd00d2 [diff] |
Fix decode fail on image with invalid eXIf chunk
diff --git a/pngrutil.c b/pngrutil.c index 4db3de9..a825f14 100644 --- a/pngrutil.c +++ b/pngrutil.c
@@ -2079,7 +2079,7 @@ if (i == 1 && buf[0] != 'M' && buf[0] != 'I' && info_ptr->eXIf_buf[0] != buf[0]) { - png_crc_finish(png_ptr, length); + png_crc_finish(png_ptr, length-i-1); png_chunk_benign_error(png_ptr, "incorrect byte-order specifier"); png_free(png_ptr, info_ptr->eXIf_buf); info_ptr->eXIf_buf = NULL;