summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorRyan Harrison <rharrison@chromium.org>2017-08-31 16:37:48 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-08-31 20:44:44 +0000
commitc5ac05726a38d214d399f7be42811d659f9f9d9a (patch)
tree809faaf99905745c216d2b1f47cda3c52c1da67c /core
parent0733a1b6a1c3f1d2907f85e823b1b9674322d97b (diff)
downloadpdfium-c5ac05726a38d214d399f7be42811d659f9f9d9a.tar.xz
Make FPDF_GetText stricter on inputs
The current implementation of this function is problematic. It will attempt to memcpy to NULL. It will accept obviously wrong inputs like a negative start index. It will also accept -1 for the count, which in theory is the amount of space the buffer has allocated to it, so doesn't make sense, but instead an internal call will calculate the number of characters to get if the count is -1. This will them lead to the function attempting to call Left(-1) on a string, which is invalid. Ths documentation for this function mentions none of this behaviour, so I am removing it, since it is inconsistent/bad. The implementation should now more strictly meet defined API. BUG=pdfium:828 Change-Id: I18afdb33e12d77c10d856b4bacd615481979c484 Reviewed-on: https://pdfium-review.googlesource.com/12733 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core')
0 files changed, 0 insertions, 0 deletions