1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-03-13 20:58:16 +03:00

Fix another memory leak in xmlSchemaValAtomicType

Don't collapse language IDs twice.

Found with libFuzzer and ASan.
This commit is contained in:
Nick Wellnhofer 2020-06-21 15:21:45 +02:00
parent eac1c7e2e5
commit 50f18830e1

View File

@ -2636,7 +2636,7 @@ xmlSchemaValAtomicType(xmlSchemaTypePtr type, const xmlChar * value,
goto return0;
}
case XML_SCHEMAS_LANGUAGE:
if (normOnTheFly) {
if ((norm == NULL) && (normOnTheFly)) {
norm = xmlSchemaCollapseString(value);
if (norm != NULL)
value = norm;