diff options
author | Qiang Zhou <nju04zq@gmail.com> | 2019-12-19 18:33:21 +0800 |
---|---|---|
committer | Cosmin Truta <ctruta@gmail.com> | 2021-03-13 02:10:50 -0500 |
commit | c4bd411c35290f9568da44a7faf7a09505db78db (patch) | |
tree | 210e4e5be898d8276aa4b707cb3789b3cab2d7bc | |
parent | 2224c8ea7b901ba038fdeff13605a60563bd00d2 (diff) | |
download | libpng-c4bd411c35290f9568da44a7faf7a09505db78db.tar.gz |
Fix decode fail on image with invalid eXIf chunk
-rw-r--r-- | pngrutil.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pngrutil.c b/pngrutil.c index 4db3de990..a825f148c 100644 --- a/pngrutil.c +++ b/pngrutil.c @@ -2079,7 +2079,7 @@ png_handle_eXIf(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) 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; |