From ba41a35553573ab718026e8508e1e32107db6595 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Mon, 14 Dec 2015 16:33:02 -0800 Subject: Fix another former FX_BSTRC usage with embedded NULs. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1522283002 . --- core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'core') diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp index 61a25d565b..fcb1c2ed86 100644 --- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp +++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp @@ -1182,7 +1182,9 @@ FX_BOOL CPDF_Parser::IsFormStream(FX_DWORD objnum, FX_BOOL& bForm) { FX_FILESIZE size = ((FX_FILESIZE*)pResult)[1] - pos; FX_FILESIZE SavedPos = m_Syntax.SavePos(); m_Syntax.RestorePos(pos); - bForm = m_Syntax.SearchMultiWord("/Form\0stream", TRUE, size) == 0; + const char kFormStream[] = "/Form\0stream"; + const CFX_ByteStringC kFormStreamStr(kFormStream, sizeof(kFormStream) - 1); + bForm = m_Syntax.SearchMultiWord(kFormStreamStr, TRUE, size) == 0; m_Syntax.RestorePos(SavedPos); return TRUE; } -- cgit v1.2.3