summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Harrison <rharrison@chromium.org>2017-09-12 11:38:59 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-09-12 18:40:38 +0000
commit8ac74971a33520afb73a8ca6628da1a0a78c85a8 (patch)
tree279cf8e84ab73022621b5d7fc08c2144ab52a4cb
parent4588792ebfcfdd628b76f005fa0e1d7935739139 (diff)
downloadpdfium-8ac74971a33520afb73a8ca6628da1a0a78c85a8.tar.xz
Remove ASSERT that was added to understand what was occuring
thestig provided a test PDF that reproduced the issue that is being tested for in the ASSERT. I have spent some time going throught the related code, and the condition in the assert is actually standard behaviour, so shouldn't be asserted. The following code gracefully handles the case of more text then requested being returned. BUG=chromium:763369 Change-Id: I5bc121977169deead52fc5dd2503376b1b62d83f Reviewed-on: https://pdfium-review.googlesource.com/13750 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
-rw-r--r--fpdfsdk/fpdftext.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/fpdfsdk/fpdftext.cpp b/fpdfsdk/fpdftext.cpp
index ee4354735e..5b68da4eee 100644
--- a/fpdfsdk/fpdftext.cpp
+++ b/fpdfsdk/fpdftext.cpp
@@ -175,7 +175,6 @@ FPDF_EXPORT int FPDF_CALLCONV FPDFText_GetText(FPDF_TEXTPAGE text_page,
if (str.GetLength() <= 0)
return 0;
- ASSERT(str.GetLength() <= static_cast<FX_STRSIZE>(count));
if (str.GetLength() > static_cast<FX_STRSIZE>(count))
str = str.Left(static_cast<FX_STRSIZE>(count));