1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2026-01-26 21:41:34 +03:00

fuzz: Make fuzzy encoding match more lenient

This should account for possible iconv suffixes.
This commit is contained in:
Nick Wellnhofer
2025-10-13 22:58:38 +02:00
parent 367a283b9a
commit 870c036341

View File

@@ -1309,7 +1309,8 @@ xmlEncodingMatch(const char *name1, const char *name2) {
name2 += 1;
}
return((*name1 == 0) && (*name2 == 0));
/* Only check whether name1 starts with name2 */
return(*name2 == 0);
}
#endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */