Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(360)

Issue 2222843004: Check if image width or height are zero before proceeding. (Closed)

Created:
4 years, 4 months ago by dsinclair
Modified:
4 years, 4 months ago
Reviewers:
Tom Sepez, Lei Zhang
CC:
pdfium-reviews_googlegroups.com, npm
Base URL:
https://pdfium.googlesource.com/pdfium.git@master
Target Ref:
refs/heads/master
Project:
pdfium
Visibility:
Public.

Description

Check if image width or height are zero before proceeding. If the width of the CJBig2_Image is set to 0 then the stride_pixels will be zero and when we divide we'll get a floating point exception. If the width or height are zero then we can exit early without proceeding with the rest of the constructor. BUG=chromium:635008 Committed: https://pdfium.googlesource.com/pdfium/+/b1b8668ef12ae4e7fcb5fbf3f01fa623a319a092

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -1 line) Patch
M core/fxcodec/jbig2/JBig2_Image.cpp View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 10 (6 generated)
dsinclair
PTAL. Tom, this seems to better match the check that was in the original code ...
4 years, 4 months ago (2016-08-08 17:51:27 UTC) #4
Tom Sepez
lgtm
4 years, 4 months ago (2016-08-08 17:56:21 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2222843004/1
4 years, 4 months ago (2016-08-08 17:57:17 UTC) #8
commit-bot: I haz the power
4 years, 4 months ago (2016-08-08 18:10:52 UTC) #10
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://pdfium.googlesource.com/pdfium/+/b1b8668ef12ae4e7fcb5fbf3f01fa623a319...

Powered by Google App Engine
This is Rietveld 408576698