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

Issue 1575833004: Fix an infinite loop parsing in CPDF_SyntaxParser::GetObject() (Closed)

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

Description

Fix an infinite loop parsing in CPDF_SyntaxParser::GetObject() CPDF_SyntaxParser::GetObject() may enter into an infinite loop when a signature dictionary doesn't have 'Contents' field. Add a check to avoid that. BUG=pdfium:344 R=thestig@chromium.org Committed: https://pdfium.googlesource.com/pdfium/+/d3ab0f383f6736657480a8bb418c5e715a1aed3b

Patch Set 1 #

Total comments: 6

Patch Set 2 : address comments #

Patch Set 3 : comment change #

Unified diffs Side-by-side diffs Delta from patch set Stats (+19 lines, -3 lines) Patch
M core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp View 1 1 chunk +4 lines, -3 lines 0 comments Download
M fpdfsdk/src/fpdfview_embeddertest.cpp View 1 2 1 chunk +6 lines, -0 lines 0 comments Download
A testing/resources/bug_344.pdf View 1 2 1 chunk +9 lines, -0 lines 0 comments Download

Messages

Total messages: 10 (4 generated)
Wei Li
PTAL, thanks
4 years, 11 months ago (2016-01-11 19:16:16 UTC) #3
Lei Zhang
https://codereview.chromium.org/1575833004/diff/1/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp File core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp (right): https://codereview.chromium.org/1575833004/diff/1/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp#newcode2168 core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp:2168: if (IsSignatureDict(pDict.get()) && dwSignValuePos) { If |dwSignValuePos| is non-zero, ...
4 years, 11 months ago (2016-01-11 19:55:03 UTC) #5
Wei Li
https://codereview.chromium.org/1575833004/diff/1/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp File core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp (right): https://codereview.chromium.org/1575833004/diff/1/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp#newcode2168 core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp:2168: if (IsSignatureDict(pDict.get()) && dwSignValuePos) { Infinite loops caused during ...
4 years, 11 months ago (2016-01-11 21:07:20 UTC) #6
Lei Zhang
lgtm
4 years, 11 months ago (2016-01-11 21:33:43 UTC) #7
Lei Zhang
BTW, I fixed a typo in the commit msg.
4 years, 11 months ago (2016-01-11 21:35:13 UTC) #8
Wei Li
4 years, 11 months ago (2016-01-11 22:05:48 UTC) #10
Message was sent while issue was closed.
Committed patchset #3 (id:40001) manually as
d3ab0f383f6736657480a8bb418c5e715a1aed3b (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698