summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-12-14 16:33:02 -0800
committerLei Zhang <thestig@chromium.org>2015-12-14 16:33:02 -0800
commitba41a35553573ab718026e8508e1e32107db6595 (patch)
tree5ef8122886862bce06471d63ae2612e84e3763fe /core
parenta65eca4a589f8381c5486899682d8404551a2c7a (diff)
downloadpdfium-ba41a35553573ab718026e8508e1e32107db6595.tar.xz
Fix another former FX_BSTRC usage with embedded NULs.
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1522283002 .
Diffstat (limited to 'core')
-rw-r--r--core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp4
1 files changed, 3 insertions, 1 deletions
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;
}