Fix garbled text when loading linearized pdf document
authorBo Xu <bo_xu@foxitsoftware.com>
Thu, 17 Jul 2014 18:13:13 +0000 (11:13 -0700)
committerBo Xu <bo_xu@foxitsoftware.com>
Thu, 17 Jul 2014 18:13:13 +0000 (11:13 -0700)
BUG=260112, 249006, 275281, 354966, 365302, 236952
R=thestig@chromium.org

Review URL: https://codereview.chromium.org/400083002

core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp

index b79aad6..f82bf3a 100644 (file)
@@ -1650,7 +1650,7 @@ FX_DWORD CPDF_Parser::LoadLinearizedMainXRefTable()
         m_Syntax.m_MetadataObjnum = dwSaveMetadataObjnum;
         return PDFPARSE_ERROR_FORMAT;
     }
-    FXSYS_qsort(m_SortedOffset.GetData(), m_SortedOffset.GetSize(), sizeof(FX_DWORD), _CompareDWord);
+    FXSYS_qsort(m_SortedOffset.GetData(), m_SortedOffset.GetSize(), sizeof(FX_FILESIZE), _CompareFileSize);
     m_Syntax.m_MetadataObjnum = dwSaveMetadataObjnum;
     return PDFPARSE_ERROR_SUCCESS;
 }