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

Issue 2206253002: Fix FMCallExpression undefined shift behaviour. (Closed)

Created:
4 years, 4 months ago by dsinclair
Modified:
4 years, 4 months ago
Reviewers:
Lei Zhang, Wei Li
CC:
pdfium-reviews_googlegroups.com, npm
Base URL:
https://pdfium.googlesource.com/pdfium.git@master
Target Ref:
refs/heads/master
Project:
pdfium
Visibility:
Public.

Description

Fix FMCallExpression undefined shift behaviour. When determining which params should be an object and which are a value it is possible to overflow the int on the shift comparision (if there are more then 32 arguments). This never happens in practise as it's a controlled list of method calls which we pass objects for. Cap the check at 32 for the shifting so it doesn't overflow. We can revisit and extend the value later if we ever have an internal formcalc method that needs an object in a position greater then 32. BUG=chromium:603490 Committed: https://pdfium.googlesource.com/pdfium/+/e85f971fe9ba628e46bcb0709d5da4368c15d0b0

Patch Set 1 #

Total comments: 9

Patch Set 2 : Review cleanup #

Unified diffs Side-by-side diffs Delta from patch set Stats (+48 lines, -1 line) Patch
M BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M pdfium.gyp View 1 chunk +1 line, -0 lines 0 comments Download
M xfa/fxfa/fm2js/xfa_simpleexpression.cpp View 1 chunk +4 lines, -1 line 0 comments Download
A xfa/fxfa/fm2js/xfa_simpleexpression_unittest.cpp View 1 1 chunk +42 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 16 (10 generated)
dsinclair
PTAL. https://codereview.chromium.org/2206253002/diff/1/xfa/fxfa/fm2js/xfa_simpleexpression_unittest.cpp File xfa/fxfa/fm2js/xfa_simpleexpression_unittest.cpp (right): https://codereview.chromium.org/2206253002/diff/1/xfa/fxfa/fm2js/xfa_simpleexpression_unittest.cpp#newcode14 xfa/fxfa/fm2js/xfa_simpleexpression_unittest.cpp:14: new CXFA_FMIdentifierExpressionn(0, CFX_WideStringC(L"sign")); I'll fix the double n's ...
4 years, 4 months ago (2016-08-03 14:55:15 UTC) #4
Lei Zhang
https://codereview.chromium.org/2206253002/diff/1/xfa/fxfa/fm2js/xfa_simpleexpression.cpp File xfa/fxfa/fm2js/xfa_simpleexpression.cpp (right): https://codereview.chromium.org/2206253002/diff/1/xfa/fxfa/fm2js/xfa_simpleexpression.cpp#newcode543 xfa/fxfa/fm2js/xfa_simpleexpression.cpp:543: for (int i = 0; i < m_pArguments->GetSize(); ++i) ...
4 years, 4 months ago (2016-08-03 16:43:23 UTC) #7
dsinclair
https://codereview.chromium.org/2206253002/diff/1/xfa/fxfa/fm2js/xfa_simpleexpression.cpp File xfa/fxfa/fm2js/xfa_simpleexpression.cpp (right): https://codereview.chromium.org/2206253002/diff/1/xfa/fxfa/fm2js/xfa_simpleexpression.cpp#newcode543 xfa/fxfa/fm2js/xfa_simpleexpression.cpp:543: for (int i = 0; i < m_pArguments->GetSize(); ++i) ...
4 years, 4 months ago (2016-08-03 16:55:36 UTC) #10
Lei Zhang
lgtm
4 years, 4 months ago (2016-08-03 16:57:58 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2206253002/20001
4 years, 4 months ago (2016-08-03 17:00:51 UTC) #14
commit-bot: I haz the power
4 years, 4 months ago (2016-08-03 17:08:19 UTC) #16
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://pdfium.googlesource.com/pdfium/+/e85f971fe9ba628e46bcb0709d5da4368c15...

Powered by Google App Engine
This is Rietveld 408576698