summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser/cpdf_syntax_parser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/parser/cpdf_syntax_parser.cpp')
-rw-r--r--core/fpdfapi/parser/cpdf_syntax_parser.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/fpdfapi/parser/cpdf_syntax_parser.cpp b/core/fpdfapi/parser/cpdf_syntax_parser.cpp
index 4a7810fc43..779bf81e0f 100644
--- a/core/fpdfapi/parser/cpdf_syntax_parser.cpp
+++ b/core/fpdfapi/parser/cpdf_syntax_parser.cpp
@@ -690,6 +690,9 @@ std::unique_ptr<CPDF_Stream> CPDF_SyntaxParser::ReadStream(
std::unique_ptr<uint8_t, FxFreeDeleter> pData;
if (len > 0) {
+ if (pCryptoHandler && pCryptoHandler->IsCipherAES() && len < 16)
+ return nullptr;
+
pData.reset(FX_Alloc(uint8_t, len));
ReadBlock(pData.get(), len);
if (pCryptoHandler) {