Age | Commit message (Collapse) | Author |
|
Change the underlying type for FX_STRSIZE to size_t from int. This
will make the value unsigned and thus all values in the range of the
type will be valid. This allows for the final remove of negative
length strings, but also introduces a some casting and functional
errors, since many parts of the code base assume that FX_STRSIZE is
int or another signed type. This also CL fixes these errors.
BUG=pdfium:828
Change-Id: I231dca59e96fc9330cbb099eecbdfc41fcf86f5b
Reviewed-on: https://pdfium-review.googlesource.com/11830
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Since there is no guarantee of termination if the StringC was
extracted from a snippet of another string. Make it more obvious
that things like
strlen(str.unterminated_c_str())
might be a bad idea.
Change-Id: I7832248ed89ebbddf5c0bcd402aac7d40ec2adc2
Reviewed-on: https://pdfium-review.googlesource.com/8170
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Remove handling of arbitrary function calls, and only allow supported
function calls. Issues with the lexer being overly permissive led to
large blobs of javascript being dropped into the output. Specifically
driver code was assuming that anything marked as a function would just
be an identifier that could be inserted into the javascript, but the
lexer marks things like ()()() as a function, which would lead to the
following JS being inserted as an identifier.
This change is intended to be a patch for the specific issue that was
being seen from the fuzzer test, and further work will be needed to
make the lexer more strict.
BUG=724913
TEST=Ran fuzzer test case. Ran unittests,embeddertests,corpustests.
Change-Id: Ib7d9239bf6fece853bea0f4915ee4ad72d3cd290
Reviewed-on: https://pdfium-review.googlesource.com/7032
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL adds tests for the FormCalc methods that don't require passing in a
formcalc object reference.
Change-Id: Ica6f15704cce525d38d25a27d1628089d2fc5a5a
Reviewed-on: https://pdfium-review.googlesource.com/5691
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This Cl adds the basis of the test framework to execute the javascript
produced by CXFA_FM2JSContext and verify the results are correct.
Change-Id: Ie46625b7e27ca0808e9cc41fdc00b7c0a212837d
Reviewed-on: https://pdfium-review.googlesource.com/5651
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|