From 9e554510e688a8f41c8e602edd15369ab9b2f00e Mon Sep 17 00:00:00 2001 From: chenzhaohui Date: Wed, 10 Sep 2025 14:18:31 +0800 Subject: [PATCH] check heif box null Signed-off-by: chenzhaohui Change-Id: I276c6df9ad229bda90da7812f9ef2416013a74c8 --- .../libextplugin/src/heif_impl/heif_parser/box/heif_box.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/common/libs/image/libextplugin/src/heif_impl/heif_parser/box/heif_box.cpp b/plugins/common/libs/image/libextplugin/src/heif_impl/heif_parser/box/heif_box.cpp index beba58f9c..401cdea4c 100644 --- a/plugins/common/libs/image/libextplugin/src/heif_impl/heif_parser/box/heif_box.cpp +++ b/plugins/common/libs/image/libextplugin/src/heif_impl/heif_parser/box/heif_box.cpp @@ -269,7 +269,9 @@ heif_error HeifBox::ReadChildren(HeifStreamReader &reader, uint32_t &recursionCo if (error != heif_error_ok) { return error; } - children_.push_back(std::move(box)); + if (box != nullptr) { + children_.push_back(std::move(box)); + } } return reader.GetError(); } -- Gitee