summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_text.cpp
diff options
context:
space:
mode:
authorNicolas Pena <npm@chromium.org>2017-03-29 15:00:08 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-03-29 19:20:57 +0000
commit47b8f070dc11308e0bef3a157f6c70fbcad4093a (patch)
tree83e5c1387cd4310a14d2a96c4f21f1d82a52f328 /xfa/fxfa/parser/cxfa_text.cpp
parent9ad342b60490b9e88896aaf2eb7fb8f7bfa73e5a (diff)
downloadpdfium-47b8f070dc11308e0bef3a157f6c70fbcad4093a.tar.xz
Do more checks before big allocs in TIFFReadDirEntryArray
This CL fixes the only caller to TIFFReadDirEntryData with potentially large size so that we avoid big mallocs when we know we will fail. It does this as follows: - Avoid the unnecessary computations if datasize is very small. We don't want to be slower in this case. - If !isMapped(tif), we will Seek and Read. Check that ending position is reachable. In the other case, do a simple check for out of bounds. Bug: chromium:681311 Change-Id: Ia172d8b4d401753b7c8d5455dc1ada5335f6fa6b Reviewed-on: https://pdfium-review.googlesource.com/3253 Commit-Queue: Nicolás Peña <npm@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_text.cpp')
0 files changed, 0 insertions, 0 deletions