diff options
author | Bruce Dawson <brucedawson@google.com> | 2015-01-05 10:06:47 -0800 |
---|---|---|
committer | Bruce Dawson <brucedawson@google.com> | 2015-01-05 10:06:47 -0800 |
commit | fef49bc5e23e860fc9d3529839d1a4eb684feafc (patch) | |
tree | 7e787678b6b19db476eb312cde9ddcfc60f14870 /fpdfsdk/src/fpdfview.cpp | |
parent | 87e9598a159d17a3b45821635b7ad43a18dd6f11 (diff) | |
download | pdfium-fef49bc5e23e860fc9d3529839d1a4eb684feafc.tar.xz |
Fixed incorrect use of FX_WSTRC on FX_WCHAR* vars.
FX_WSTRC is only valid on arrays, not pointers. In five places it was
being passed a pointer, which leads to incorrect string objects being
created. This was found when integrating a change to FX_WSTRC that
disallows pointer arguments.
The consequence of this bug is that five XML strings (quot, amp,
apos, lt, and gt) will all end up with incorrect lengths. They
will all be one character long in 32-bit builds, and three characters
long in 64-bit builds (sizeof(WCHAR*)-1).
Also removed some unneeded casts and marked some arrays as const.
Fixing this is necessary in order to allow landing of
https://codereview.chromium.org/818193004/
Testing this was attempted by using the xfa branch of pdfium in
Chrome:
cd third_party\pdfium
git checkout xfa
However even without these changes this caused a CHECK failure in
V8::InitializePlatform due to double initialization, so the fix
has not been tested, but is clearly an improvement.
BUG= https://code.google.com/p/pdfium/issues/detail?id=96
R=bo_xu@foxitsoftware.com
Review URL: https://codereview.chromium.org/826573003
Diffstat (limited to 'fpdfsdk/src/fpdfview.cpp')
0 files changed, 0 insertions, 0 deletions