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

Issue 1558093002: Exit infinite loops for cross reference loading (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

Exit infinite loops for cross reference loading When cross reference sections form a loop, our code will enter an infinite loop. Add detection and exit code for v4 cross reference loading. V5 loading was done previously. R=thestig@chromium.org Committed: https://pdfium.googlesource.com/pdfium/+/aab8f462ea3368ed4825172231131e1a10db978d

Patch Set 1 #

Total comments: 6

Patch Set 2 : address comments #

Total comments: 2

Patch Set 3 : comment change #

Unified diffs Side-by-side diffs Delta from patch set Stats (+76 lines, -19 lines) Patch
M core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp View 1 2 2 chunks +23 lines, -19 lines 0 comments Download
M fpdfsdk/src/fpdfview_embeddertest.cpp View 1 chunk +8 lines, -0 lines 0 comments Download
A testing/resources/bug_xrefv4_loop.pdf View 1 2 1 chunk +45 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (2 generated)
Wei Li
PTAL, thanks.
4 years, 11 months ago (2016-01-05 03:19:31 UTC) #2
Lei Zhang
https://codereview.chromium.org/1558093002/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/1558093002/diff/1/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp#newcode386 core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp:386: if (seen_xrefpos.find(xrefpos) != seen_xrefpos.end()) I added pdfium::ContainsKey() recently. You ...
4 years, 11 months ago (2016-01-05 03:30:27 UTC) #3
Lei Zhang
Otherwise lgtm
4 years, 11 months ago (2016-01-05 03:30:57 UTC) #4
Wei Li
thanks, PTAL https://codereview.chromium.org/1558093002/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/1558093002/diff/1/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp#newcode386 core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp:386: if (seen_xrefpos.find(xrefpos) != seen_xrefpos.end()) On 2016/01/05 03:30:27, ...
4 years, 11 months ago (2016-01-05 19:52:00 UTC) #5
Lei Zhang
lgtm https://codereview.chromium.org/1558093002/diff/20001/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp File core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp (right): https://codereview.chromium.org/1558093002/diff/20001/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp#newcode380 core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp:380: // When m_pTrailer doesn't have Prev entry or ...
4 years, 11 months ago (2016-01-05 20:18:56 UTC) #6
Wei Li
4 years, 11 months ago (2016-01-05 20:34:07 UTC) #8
Message was sent while issue was closed.
Committed patchset #3 (id:40001) manually as
aab8f462ea3368ed4825172231131e1a10db978d (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698