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

Issue 1582963003: Fix some iterator invalidation issues while traversing CPDF_Dictionary. (Closed)

Created:
4 years, 11 months ago by Oliver Chang
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 some iterator invalidation issues while traversing CPDF_Dictionary. Also fixes a potential issue in CPDF_Dictionary::ReplaceKey. R=thestig@chromium.org BUG=577030 Committed: https://pdfium.googlesource.com/pdfium/+/cae57daaa0f7ed4c92e22c4e7ef30392393d1128

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : fix a bug in CPDF_Dictionary::ReplaceKey while we're at it #

Total comments: 6

Patch Set 4 : address comments, make comments read better #

Patch Set 5 : rebase, use Lei's fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+16 lines, -6 lines) Patch
M core/include/fpdfapi/fpdf_objects.h View 1 2 3 2 chunks +3 lines, -0 lines 0 comments Download
M core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp View 1 2 3 1 chunk +5 lines, -3 lines 0 comments Download
M fpdfsdk/src/fpdfppo.cpp View 1 2 3 1 chunk +5 lines, -3 lines 0 comments Download

Messages

Total messages: 17 (10 generated)
Oliver Chang
ptal. also replaces fix in https://codereview.chromium.org/1581963004/
4 years, 11 months ago (2016-01-14 00:50:32 UTC) #7
Lei Zhang
https://codereview.chromium.org/1582963003/diff/120001/core/include/fpdfapi/fpdf_objects.h File core/include/fpdfapi/fpdf_objects.h (right): https://codereview.chromium.org/1582963003/diff/120001/core/include/fpdfapi/fpdf_objects.h#newcode388 core/include/fpdfapi/fpdf_objects.h:388: // Set* functions invalidates iterators for the given key. ...
4 years, 11 months ago (2016-01-14 01:32:30 UTC) #11
Oliver Chang
https://codereview.chromium.org/1582963003/diff/120001/core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp File core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp (right): https://codereview.chromium.org/1582963003/diff/120001/core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp#newcode737 core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp:737: if (new_it == old_it) On 2016/01/14 01:32:29, Lei Zhang ...
4 years, 11 months ago (2016-01-14 01:44:21 UTC) #12
Lei Zhang
lgtm, but you need to rebase and decide whether to undo my fix or not.
4 years, 11 months ago (2016-01-14 01:51:40 UTC) #13
Oliver Chang
thanks, let's go with your fix https://codereview.chromium.org/1582963003/diff/120001/core/include/fpdfapi/fpdf_objects.h File core/include/fpdfapi/fpdf_objects.h (right): https://codereview.chromium.org/1582963003/diff/120001/core/include/fpdfapi/fpdf_objects.h#newcode388 core/include/fpdfapi/fpdf_objects.h:388: // Set* functions ...
4 years, 11 months ago (2016-01-14 02:04:53 UTC) #14
Lei Zhang
On 2016/01/14 02:04:53, Oliver Chang wrote: > thanks, let's go with your fix > > ...
4 years, 11 months ago (2016-01-14 02:13:21 UTC) #15
Oliver Chang
4 years, 11 months ago (2016-01-14 02:32:18 UTC) #17
Message was sent while issue was closed.
Committed patchset #5 (id:160001) manually as
cae57daaa0f7ed4c92e22c4e7ef30392393d1128 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698