Kaydet (Commit) 26a8abf1 authored tarafından Neal Norwitz's avatar Neal Norwitz

Handle failures from lookup.

Klocwork 341-342
üst ee7c8f9a
......@@ -2795,6 +2795,8 @@ storeAtts(XML_Parser parser, const ENCODING *enc,
unsigned long uriHash = 0;
((XML_Char *)s)[-1] = 0; /* clear flag */
id = (ATTRIBUTE_ID *)lookup(&dtd->attributeIds, s, 0);
if (!id)
return XML_ERROR_NO_MEMORY;
b = id->prefix->binding;
if (!b)
return XML_ERROR_UNBOUND_PREFIX;
......@@ -5340,6 +5342,8 @@ getAttributeId(XML_Parser parser, const ENCODING *enc,
return NULL;
id->prefix = (PREFIX *)lookup(&dtd->prefixes, poolStart(&dtd->pool),
sizeof(PREFIX));
if (!id->prefix)
return NULL;
if (id->prefix->name == poolStart(&dtd->pool))
poolFinish(&dtd->pool);
else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment