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

Issue 1421973004: Type check the m_pShadingObj before assuming it's a stream. (Closed)

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

Description

Type check the m_pShadingObj before assuming it's a stream. The m_pShadingObj can be a stream or a dictionary depending on how it's used. This CL adds some simple type checking to make sure that the type of the object matches what we expect. BUG=chromium:547706 R=tsepez@chromium.org Committed: https://pdfium.googlesource.com/pdfium/+/4ef782ab57979add3e3910d6bcfde6ef59f65724

Patch Set 1 #

Patch Set 2 : #

Total comments: 2

Patch Set 3 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+121 lines, -0 lines) Patch
M BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
A core/src/fpdfapi/fpdf_render/fpdf_render_pattern_embeddertest.cpp View 1 chunk +16 lines, -0 lines 0 comments Download
M pdfium.gyp View 1 chunk +1 line, -0 lines 0 comments Download
A testing/resources/bug_547706.in View 1 chunk +43 lines, -0 lines 0 comments Download
A testing/resources/bug_547706.pdf View 1 2 1 chunk +55 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (2 generated)
dsinclair
PTAL. Patch Set 1 was the reverted CL. Patch set two is the new approach.
5 years, 1 month ago (2015-10-27 13:42:20 UTC) #3
Tom Sepez
lgtm https://codereview.chromium.org/1421973004/diff/20001/core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp File core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp (right): https://codereview.chromium.org/1421973004/diff/20001/core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp#newcode146 core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp:146: if (!ToStream(m_pShadingObj)) nit: combine with previous if.
5 years, 1 month ago (2015-10-27 16:04:00 UTC) #4
dsinclair
https://codereview.chromium.org/1421973004/diff/20001/core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp File core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp (right): https://codereview.chromium.org/1421973004/diff/20001/core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp#newcode146 core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp:146: if (!ToStream(m_pShadingObj)) On 2015/10/27 16:04:00, Tom Sepez wrote: > ...
5 years, 1 month ago (2015-10-27 16:08:15 UTC) #5
dsinclair
5 years, 1 month ago (2015-10-27 16:08:24 UTC) #6
Message was sent while issue was closed.
Committed patchset #3 (id:40001) manually as
4ef782ab57979add3e3910d6bcfde6ef59f65724 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698