From 3ba165a75b899f37b9decd9eebcc22d6440fd99e Mon Sep 17 00:00:00 2001 From: lifumin Date: Thu, 14 Aug 2025 20:45:52 +0800 Subject: [PATCH] lifumin3@h-partners.com Signed-off-by: lifumin --- libexif/huawei/exif-mnote-data-huawei.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexif/huawei/exif-mnote-data-huawei.c b/libexif/huawei/exif-mnote-data-huawei.c index 4c32a6f..af0fa2f 100644 --- a/libexif/huawei/exif-mnote-data-huawei.c +++ b/libexif/huawei/exif-mnote-data-huawei.c @@ -210,7 +210,7 @@ exif_mnote_data_huawei_save (ExifMnoteData *ne, unsigned char **buf, unsigned in unsigned int malloc_size = sizeof(HUAWEI_HEADER); exif_mnote_data_huawei_malloc_size_data(ne, &malloc_size); - if (!malloc_size) { + if (malloc_size < HUAWEI_HEADER_OFFSET) { exif_log (ne->log, EXIF_LOG_CODE_CORRUPT_DATA, "ExifMnoteHuawei", "The memory(%d) request failed", malloc_size); return; } -- Gitee