From 8ac74971a33520afb73a8ca6628da1a0a78c85a8 Mon Sep 17 00:00:00 2001 From: Ryan Harrison Date: Tue, 12 Sep 2017 11:38:59 -0400 Subject: 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 Commit-Queue: Ryan Harrison --- fpdfsdk/fpdftext.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'fpdfsdk') 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(count)); if (str.GetLength() > static_cast(count)) str = str.Left(static_cast(count)); -- cgit v1.2.3