fix cve bugs

Signed-off-by: lifumin <lifumin3@h-partners.com>
This commit is contained in:
trafficPC167
2026-04-21 14:33:36 +08:00
committed by lifuminharmony
parent c4c78a9fe1
commit e2ace76115
7 changed files with 24 additions and 2 deletions
+3
View File
@@ -43,6 +43,9 @@ mnote_apple_entry_get_value(MnoteAppleEntry *entry, char *v, unsigned int maxlen
if (!entry)
return NULL;
if (maxlen < 1) {
return NULL;
}
memset(v, 0, maxlen);
maxlen--;
+3
View File
@@ -561,6 +561,9 @@ mnote_canon_entry_get_value (const MnoteCanonEntry *entry, unsigned int t, char
if (!entry)
return NULL;
if (maxlen < 1) {
return NULL;
}
data = entry->data;
size = entry->size;
+3 -1
View File
@@ -70,7 +70,9 @@ exif_mnote_data_fuji_get_value (ExifMnoteData *d, unsigned int i, char *val, uns
ExifMnoteDataFuji *n = (ExifMnoteDataFuji *) d;
if (!d || !val) return NULL;
if (i > n->count -1) return NULL;
if (i >= n->count) {
return NULL;
}
/*
exif_log (d->log, EXIF_LOG_CODE_DEBUG, "ExifMnoteDataFuji",
"Querying value for tag '%s'...",
+3
View File
@@ -201,6 +201,9 @@ mnote_fuji_entry_get_value (MnoteFujiEntry *entry,
int i, j;
if (!entry) return (NULL);
if (maxlen < 1) {
return NULL;
}
memset (val, 0, maxlen);
maxlen--;
+6 -1
View File
@@ -78,7 +78,9 @@ exif_mnote_data_olympus_get_value (ExifMnoteData *d, unsigned int i, char *val,
ExifMnoteDataOlympus *n = (ExifMnoteDataOlympus *) d;
if (!d || !val) return NULL;
if (i > n->count -1) return NULL;
if (i >= n->count) {
return NULL;
}
/*
exif_log (d->log, EXIF_LOG_CODE_DEBUG, "ExifMnoteDataOlympus",
"Querying value for tag '%s'...",
@@ -386,6 +388,9 @@ exif_mnote_data_olympus_load (ExifMnoteData *en,
o2 += 2;
/* Go to where the number of entries is. */
if (CHECKOVERFLOW(o2,buf_size,exif_get_long (buf + o2, n->order))) {
return;
}
o2 = datao + exif_get_long (buf + o2, n->order);
break;
+3
View File
@@ -286,6 +286,9 @@ mnote_olympus_entry_get_value (MnoteOlympusEntry *entry, char *v, unsigned int m
if (!entry)
return (NULL);
if (maxlen < 1) {
return NULL;
}
memset (v, 0, maxlen);
maxlen--;
+3
View File
@@ -317,6 +317,9 @@ mnote_pentax_entry_get_value (MnotePentaxEntry *entry,
int i = 0, j = 0;
if (!entry) return (NULL);
if (maxlen < 1) {
return (NULL);
}
memset (val, 0, maxlen);
maxlen--;