summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_ffpasswordedit.cpp
diff options
context:
space:
mode:
authorRyan Harrison <rharrison@chromium.org>2017-07-27 14:24:02 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-07-27 18:38:09 +0000
commit7314af7d04d3fd4f29fff1f0da648944183bd0d0 (patch)
tree4048c996e6c1db9d1eb31d22cb91c46ede2e8e70 /xfa/fxfa/cxfa_ffpasswordedit.cpp
parent495d89ff20806b6acdf564f3865b1fb974ccf44a (diff)
downloadpdfium-7314af7d04d3fd4f29fff1f0da648944183bd0d0.tar.xz
Rewrite FMLexer to use nullptr for errors
This CL rewrites how FMLexer returns errors, instead of having a flag that gets flipped and needs to be checked, it now returns nullptr for NextToken() when an error occurs. The Lexer's behaviour has also been changed to only return nullptr once an error has occurred, instead of advancing the lexing on further calls. FMParse now checks the returned value from the lexer instead of testing the error flag on the parser object. For any operation that might cause the error state of the parser to change, i.e. consuming a token, an error check has been added. In the event this check fails the related function returns nullptr. This will cause the parse to short circuit and exit. BUG=pdfium:814 Change-Id: I669012c4732c18d13009be7cd7bf1ae682950904 Reviewed-on: https://pdfium-review.googlesource.com/8950 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: (OOO Jul 28 - Aug 8) dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fxfa/cxfa_ffpasswordedit.cpp')
0 files changed, 0 insertions, 0 deletions