Fix a global buffer overflow in GCPDF_CIDFont::_CharCodeFromUnicode
authorJun Fang <jun_fang@foxitsoftware.com>
Thu, 9 Apr 2015 16:59:41 +0000 (09:59 -0700)
committerJun Fang <jun_fang@foxitsoftware.com>
Thu, 9 Apr 2015 16:59:41 +0000 (09:59 -0700)
commit1ed2ceb70476b135a3dedbb45549d6b3bc6ecdea
tree315f30c198dc74541008a08a800abf0a1d46d8a1
parentcbcc7305fd8d0d0fbed316ed092642de10c3b207
Fix a global buffer overflow in GCPDF_CIDFont::_CharCodeFromUnicode

There is not a code page (CP) used for converting unicode to mutli-bytes
if the coding scheme is CID coding. Only return 0 if CID can't be retrieved.
The difference on Windows and other platforms should be the function used
for converting rather than others.

BUG=466790
R=tsepez@chromium.org

Review URL: https://codereview.chromium.org/1074653002
core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp