diff options
author | Lei Zhang <thestig@chromium.org> | 2018-09-04 22:42:56 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-09-04 22:42:56 +0000 |
commit | 424621e3129f7029283f72e953fe0c69f982d257 (patch) | |
tree | 47d64c877a652cffd8d6da60982f2f706a07ee22 /third_party/libpng16/0003-check-errors-in-set-pcal.patch | |
parent | d51c66c57a4fa6033f025d6ddd5d17a7d4e1d001 (diff) | |
download | pdfium-424621e3129f7029283f72e953fe0c69f982d257.tar.xz |
Revert "Update libpng from 1.6.22 -> 1.6.34"chromium/3543
This reverts commit 6b2e2f0ec7c5f629c5270d14c2339197af7392d8.
Reason for revert: Broke Chromium integration.
Original change's description:
> Update libpng from 1.6.22 -> 1.6.34
>
> Updates third_party/libpng16 to Chromium's third_party/libpng @
> e87a02987101e2dbe319a4aba6b52470f7624b4a and applies PDFium specific
> patches.
>
> BUG=chromium:880322
>
> Change-Id: I6724f55099c70a79da6d6e4863b9c6c9157ec571
> Reviewed-on: https://pdfium-review.googlesource.com/41910
> Reviewed-by: Lei Zhang <thestig@chromium.org>
> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
TBR=thestig@chromium.org,rharrison@chromium.org
Change-Id: I2fd1f78e5d07ca983b2430bf078544185292ee1d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:880322
Reviewed-on: https://pdfium-review.googlesource.com/41970
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'third_party/libpng16/0003-check-errors-in-set-pcal.patch')
-rw-r--r-- | third_party/libpng16/0003-check-errors-in-set-pcal.patch | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/third_party/libpng16/0003-check-errors-in-set-pcal.patch b/third_party/libpng16/0003-check-errors-in-set-pcal.patch new file mode 100644 index 0000000000..58e27ba623 --- /dev/null +++ b/third_party/libpng16/0003-check-errors-in-set-pcal.patch @@ -0,0 +1,47 @@ +diff --git a/pngset.c b/pngset.c +index cccd9cd..83d6ce2 100644 +--- a/pngset.c ++++ b/pngset.c +@@ -283,17 +283,29 @@ png_set_pCAL(png_const_structrp png_ptr, png_inforpinfo_ptr, + + /* Check that the type matches the specification. */ + if (type < 0 || type > 3) +- png_error(png_ptr, "Invalid pCAL equation type"); ++ { ++ png_chunk_report(png_ptr, "Invalid pCAL equation type", ++ PNG_CHUNK_WRITE_ERROR); ++ return; ++ } + + if (nparams < 0 || nparams > 255) +- png_error(png_ptr, "Invalid pCAL parameter count"); ++ { ++ png_chunk_report(png_ptr, "Invalid pCAL parameter count", ++ PNG_CHUNK_WRITE_ERROR); ++ return; ++ } + + /* Validate params[nparams] */ + for (i=0; i<nparams; ++i) + { + if (params[i] == NULL || + !png_check_fp_string(params[i], strlen(params[i]))) +- png_error(png_ptr, "Invalid format for pCAL parameter"); ++ { ++ png_chunk_report(png_ptr, "Invalid format for pCAL parameter", ++ PNG_CHUNK_WRITE_ERROR); ++ return; ++ } + } + + info_ptr->pcal_purpose = png_voidcast(png_charp, +@@ -301,8 +313,8 @@ png_set_pCAL(png_const_structrp png_ptr, png_inforpinfo_ptr, + + if (info_ptr->pcal_purpose == NULL) + { +- png_warning(png_ptr, "Insufficient memory for pCAL purpose"); +- ++ png_chunk_report(png_ptr, "Insufficient memory for pCAL purpose", ++ PNG_CHUNK_WRITE_ERROR); + return; + } |