mirror of
https://github.com/libexpat/libexpat.git
synced 2025-04-15 00:38:15 +00:00
Fix bug with xml prefix.
This commit is contained in:
parent
013d3f60a4
commit
2c255ba0e6
1 changed files with 6 additions and 4 deletions
|
@ -3376,10 +3376,12 @@ int setContext(XML_Parser parser, const XML_Char *context)
|
|||
prefix = (PREFIX *)lookup(&dtd.prefixes, poolStart(&tempPool), sizeof(PREFIX));
|
||||
if (!prefix)
|
||||
return 0;
|
||||
if (prefix->name == poolStart(&tempPool))
|
||||
poolFinish(&tempPool);
|
||||
else
|
||||
poolDiscard(&tempPool);
|
||||
if (prefix->name == poolStart(&tempPool)) {
|
||||
prefix->name = poolCopyString(&dtd.pool, prefix->name);
|
||||
if (!prefix->name)
|
||||
return 0;
|
||||
}
|
||||
poolDiscard(&tempPool);
|
||||
}
|
||||
for (context = s + 1; *context != CONTEXT_SEP && *context != XML_T('\0'); context++)
|
||||
if (!poolAppendChar(&tempPool, *context))
|
||||
|
|
Loading…
Add table
Reference in a new issue