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

Issue 2323663002: Fix compare between signed and unsigned values in CPDF_ImageRenderer::StartDIBSource. (Closed)

Created:
4 years, 3 months ago by Ke Liu
Modified:
4 years, 3 months ago
Reviewers:
Lei Zhang, Oliver Chang
CC:
pdfium-reviews_googlegroups.com
Target Ref:
refs/heads/master
Project:
pdfium
Visibility:
Public.

Description

Fix compare between signed and unsigned values in CPDF_ImageRenderer::StartDIBSource. Correct the compare logic in CPDF_ImageRenderer::StartDIBSource() by using size_t instead of int. BUG=chromium:645036 R=ochang@chromium.org Committed: https://pdfium.googlesource.com/pdfium/+/2f8568ef91156d2deb8411c427fbb52f880ccc34

Patch Set 1 #

Patch Set 2 : Use FX_SAFE_SIZE_T instead of size_t #

Total comments: 2

Patch Set 3 : split calculation #

Unified diffs Side-by-side diffs Delta from patch set Stats (+9 lines, -3 lines) Patch
M core/fpdfapi/fpdf_render/fpdf_render_image.cpp View 1 2 1 chunk +9 lines, -3 lines 0 comments Download

Messages

Total messages: 11 (3 generated)
Ke Liu
4 years, 3 months ago (2016-09-08 08:21:26 UTC) #1
Lei Zhang
Maybe what you really want is FX_SAFE_SIZE_T or one of its friends.
4 years, 3 months ago (2016-09-09 22:14:26 UTC) #3
Ke Liu
On 2016/09/09 22:14:26, Lei Zhang (OOO) wrote: > Maybe what you really want is FX_SAFE_SIZE_T ...
4 years, 3 months ago (2016-09-12 12:24:01 UTC) #4
Oliver Chang
https://codereview.chromium.org/2323663002/diff/20001/core/fpdfapi/fpdf_render/fpdf_render_image.cpp File core/fpdfapi/fpdf_render/fpdf_render_image.cpp (right): https://codereview.chromium.org/2323663002/diff/20001/core/fpdfapi/fpdf_render/fpdf_render_image.cpp#newcode765 core/fpdfapi/fpdf_render/fpdf_render_image.cpp:765: FX_SAFE_SIZE_T image_size = m_pDIBSource->GetBPP() / 8 * m_pDIBSource->GetWidth() * ...
4 years, 3 months ago (2016-09-12 16:21:33 UTC) #5
Ke Liu
On 2016/09/12 16:21:33, Oliver Chang wrote: > https://codereview.chromium.org/2323663002/diff/20001/core/fpdfapi/fpdf_render/fpdf_render_image.cpp > File core/fpdfapi/fpdf_render/fpdf_render_image.cpp (right): > > https://codereview.chromium.org/2323663002/diff/20001/core/fpdfapi/fpdf_render/fpdf_render_image.cpp#newcode765 ...
4 years, 3 months ago (2016-09-13 01:46:17 UTC) #6
Oliver Chang
lgtm, thanks
4 years, 3 months ago (2016-09-14 20:03:40 UTC) #7
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/2323663002/40001
4 years, 3 months ago (2016-09-19 13:53:18 UTC) #9
commit-bot: I haz the power
4 years, 3 months ago (2016-09-19 14:05:54 UTC) #11
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://pdfium.googlesource.com/pdfium/+/2f8568ef91156d2deb8411c427fbb52f880c...

Powered by Google App Engine
This is Rietveld 408576698