From ca386ad150be28116997b713056a4a2197c7b7e8 Mon Sep 17 00:00:00 2001 From: Henrique Nakashima Date: Tue, 26 Jun 2018 19:09:39 +0000 Subject: Assert that tab width assumption holds in CFX_RTFBreak. Bug: chromium:844367 Change-Id: I3cbe5d97a913c734c3d54657a2fb47b30cc362fe Reviewed-on: https://pdfium-review.googlesource.com/36191 Commit-Queue: Ryan Harrison Reviewed-by: Ryan Harrison --- xfa/fgas/layout/cfx_rtfbreak.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/xfa/fgas/layout/cfx_rtfbreak.cpp b/xfa/fgas/layout/cfx_rtfbreak.cpp index c478d98c72..de8703fb2d 100644 --- a/xfa/fgas/layout/cfx_rtfbreak.cpp +++ b/xfa/fgas/layout/cfx_rtfbreak.cpp @@ -158,6 +158,7 @@ void CFX_RTFBreak::AppendChar_Tab(CFX_Char* pCurChar) { iSafeCharWidth = iCharWidth; } else { // Tab width is >= 160000, so this part does not need to be checked. + ASSERT(m_iTabWidth >= 160000); iSafeCharWidth = iLineWidth / m_iTabWidth + 1; iSafeCharWidth *= m_iTabWidth; } -- cgit v1.2.3