mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-13 20:58:16 +03:00
malloc-fail: Fix null deref in xmlSchemaValAtomicType
Found with libFuzzer, see #344.
This commit is contained in:
parent
112340c6c0
commit
7762e8eda1
@ -3040,6 +3040,8 @@ xmlSchemaValAtomicType(xmlSchemaTypePtr type, const xmlChar * value,
|
||||
value = norm;
|
||||
}
|
||||
tmpval = xmlStrdup(value);
|
||||
if (tmpval == NULL)
|
||||
goto error;
|
||||
for (cur = tmpval; *cur; ++cur) {
|
||||
if (*cur < 32 || *cur >= 127 || *cur == ' ' ||
|
||||
*cur == '<' || *cur == '>' || *cur == '"' ||
|
||||
|
Loading…
x
Reference in New Issue
Block a user