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

Issue 441503003: Fix the problem that memory is accessed after released due to invalid type-cast (Closed)

Created:
6 years, 4 months ago by jun_fang
Modified:
5 years, 9 months ago
Reviewers:
Tom Sepez, palmer, Bo Xu
Base URL:
https://pdfium.googlesource.com/pdfium.git@master
Visibility:
Public.

Description

Fix the problem that memory is accessed after released due to invalid type-cast BUG=387774 R=palmer@chromium.org, tsepez@chromium.org Committed: https://pdfium.googlesource.com/pdfium/+/ef72d48

Patch Set 1 #

Patch Set 2 : Adjust format: add a blank in front of * #

Patch Set 3 : #

Patch Set 4 : #

Total comments: 2

Patch Set 5 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+22 lines, -14 lines) Patch
M core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp View 1 2 2 chunks +7 lines, -4 lines 0 comments Download
M core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp View 1 2 3 4 3 chunks +10 lines, -8 lines 0 comments Download
M core/src/fpdfdoc/doc_tagged.cpp View 1 2 3 1 chunk +5 lines, -2 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
jun_fang
Hi Tom, please review this fix. Thanks!
6 years, 4 months ago (2014-08-02 23:22:45 UTC) #1
Tom Sepez
On 2014/08/02 23:22:45, jun_fang wrote: > Hi Tom, please review this fix. Thanks! LGTM. I ...
6 years, 4 months ago (2014-08-04 17:51:02 UTC) #2
palmer
> fpdf_parser_parser.cpp:1130,1138,1597 - again, check first and then cast > CPDF_Reference* pRef = m_pTrailer ? ...
6 years, 4 months ago (2014-08-04 18:34:20 UTC) #3
Tom Sepez
> Wouldn't it be best to replace this "homebrew RTTI" with real > dynamic_cast<Foo>(...)? I'm ...
6 years, 4 months ago (2014-08-04 18:41:52 UTC) #4
palmer
> I'm pretty sure we compile this with -fno-rtti so this won't work (and if ...
6 years, 4 months ago (2014-08-04 18:44:13 UTC) #5
jun_fang
Hi guys, please review the fix again.
6 years, 4 months ago (2014-08-06 20:16:11 UTC) #6
palmer
lgtm https://codereview.chromium.org/441503003/diff/60001/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp File core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp (right): https://codereview.chromium.org/441503003/diff/60001/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp#newcode1598 core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp:1598: } Remove this trailing whitespace.
6 years, 4 months ago (2014-08-06 20:23:04 UTC) #7
jun_fang
Removed trailing whitespace https://codereview.chromium.org/441503003/diff/60001/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp File core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp (right): https://codereview.chromium.org/441503003/diff/60001/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp#newcode1598 core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp:1598: } On 2014/08/06 20:23:04, Chromium Palmer ...
6 years, 4 months ago (2014-08-06 21:06:49 UTC) #8
jun_fang
6 years, 4 months ago (2014-08-06 21:10:55 UTC) #9
Message was sent while issue was closed.
Committed patchset #5 manually as ref72d48 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698