[libxml2] Fix another memory leak in xmlSchemaValAtomicType
- From: Nick Wellnhofer <nwellnhof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml2] Fix another memory leak in xmlSchemaValAtomicType
- Date: Tue, 23 Jun 2020 14:32:23 +0000 (UTC)
commit 50f18830e179f273c244d4969485c4154c81cc01
Author: Nick Wellnhofer <wellnhofer aevum de>
Date: Sun Jun 21 15:21:45 2020 +0200
Fix another memory leak in xmlSchemaValAtomicType
Don't collapse language IDs twice.
Found with libFuzzer and ASan.
xmlschemastypes.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/xmlschemastypes.c b/xmlschemastypes.c
index 1a440524..35edfd6f 100644
--- a/xmlschemastypes.c
+++ b/xmlschemastypes.c
@@ -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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]