From 0fbb50c2419ee95a95f29a4e757ba2408a4bc6b0 Mon Sep 17 00:00:00 2001 From: dan sinclair Date: Tue, 4 Apr 2017 23:17:08 -0400 Subject: Fix assignment to len. Sigh, messed up std::min conversion. TBR=npm@chromium.org Bug: pdfium:697 Change-Id: I0091f178b08fa537ebc3962d9349eb46d0aa8a80 Reviewed-on: https://pdfium-review.googlesource.com/3751 Reviewed-by: dsinclair Commit-Queue: dsinclair --- core/fpdfapi/parser/cpdf_syntax_parser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/fpdfapi') diff --git a/core/fpdfapi/parser/cpdf_syntax_parser.cpp b/core/fpdfapi/parser/cpdf_syntax_parser.cpp index 6ffd641aa8..73bf56d206 100644 --- a/core/fpdfapi/parser/cpdf_syntax_parser.cpp +++ b/core/fpdfapi/parser/cpdf_syntax_parser.cpp @@ -726,7 +726,7 @@ std::unique_ptr CPDF_SyntaxParser::ReadStream( } // Read up to the end of the buffer. - std::min(len, m_FileLen - m_Pos - m_HeaderOffset); + len = std::min(len, m_FileLen - m_Pos - m_HeaderOffset); if (len <= 0) return nullptr; -- cgit v1.2.3