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

Issue 1701363003: Fix some issues with CXFA_FMParse/CXFA_FMLexer infinite looping. (Closed)

Created:
4 years, 10 months ago by Oliver Chang
Modified:
4 years, 10 months ago
Reviewers:
Tom Sepez
CC:
pdfium-reviews_googlegroups.com
Base URL:
https://pdfium.googlesource.com/pdfium.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Fix some issues with CXFA_FMParse/CXFA_FMLexer infinite looping. The parser did not expect an invalid token in some places, leading to an infinite loop. In the lexer, if an invalid string was found, the underlying pointer was never advanced. Also cleans some minor stuff along the way: - Remove nonsensical/useless destructors - Use unique_ptrs for owned members - Remove unused members - Other minor style changes BUG=587620 R=tsepez@chromium.org Committed: https://pdfium.googlesource.com/pdfium/+/1e1d3b0f2bc6b6c185b37e0aa6b8663e901dc8bf

Patch Set 1 #

Patch Set 2 : delete more stuff #

Total comments: 10

Patch Set 3 : address nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+95 lines, -110 lines) Patch
M xfa/src/fxfa/src/fm2js/xfa_fmparse.h View 1 2 2 chunks +7 lines, -4 lines 0 comments Download
M xfa/src/fxfa/src/fm2js/xfa_fmparse.cpp View 1 2 30 chunks +40 lines, -37 lines 0 comments Download
M xfa/src/fxfa/src/fm2js/xfa_lexer.h View 1 2 4 chunks +14 lines, -11 lines 0 comments Download
M xfa/src/fxfa/src/fm2js/xfa_lexer.cpp View 1 2 14 chunks +34 lines, -58 lines 0 comments Download

Messages

Total messages: 7 (3 generated)
Oliver Chang
Tom, please take a look. There's a lot more cleanup that can be done, but ...
4 years, 10 months ago (2016-02-18 00:04:38 UTC) #3
Tom Sepez
lgtm https://codereview.chromium.org/1701363003/diff/20001/xfa/src/fxfa/src/fm2js/xfa_fmparse.cpp File xfa/src/fxfa/src/fm2js/xfa_fmparse.cpp (right): https://codereview.chromium.org/1701363003/diff/20001/xfa/src/fxfa/src/fm2js/xfa_fmparse.cpp#newcode50 xfa/src/fxfa/src/fm2js/xfa_fmparse.cpp:50: if (m_pToken->m_type == TOKeof) { nit: combine with ...
4 years, 10 months ago (2016-02-18 00:39:15 UTC) #4
Oliver Chang
thanks for the review! https://codereview.chromium.org/1701363003/diff/20001/xfa/src/fxfa/src/fm2js/xfa_fmparse.cpp File xfa/src/fxfa/src/fm2js/xfa_fmparse.cpp (right): https://codereview.chromium.org/1701363003/diff/20001/xfa/src/fxfa/src/fm2js/xfa_fmparse.cpp#newcode50 xfa/src/fxfa/src/fm2js/xfa_fmparse.cpp:50: if (m_pToken->m_type == TOKeof) { ...
4 years, 10 months ago (2016-02-18 00:49:02 UTC) #5
Oliver Chang
4 years, 10 months ago (2016-02-18 00:51:59 UTC) #7
Message was sent while issue was closed.
Committed patchset #3 (id:40001) manually as
1e1d3b0f2bc6b6c185b37e0aa6b8663e901dc8bf (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698