1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-29 11:41:22 +03:00

Someone found a bug hiding in a corner, caught it !

- parser.c: fixing bug 52299 strange condition leading
  to a parser crash due to a buffer overflow
- result/noent/attrib.xml result/attrib.xml test/attrib.xml:
  added the specific test case
Daniel
This commit is contained in:
Daniel Veillard
2001-03-20 11:27:34 +00:00
parent fbf8a2d0c8
commit 0b6b55b076
5 changed files with 18 additions and 0 deletions

View File

@ -2156,6 +2156,9 @@ xmlParseAttValue(xmlParserCtxtPtr ctxt) {
buf[len++] = *current++;
}
} else {
if (len > buf_size - 10) {
growBuffer(buf);
}
len += xmlCopyChar(0, &buf[len], val);
}
} else {
@ -2178,6 +2181,9 @@ xmlParseAttValue(xmlParserCtxtPtr ctxt) {
xmlFree(rep);
}
} else {
if (len > buf_size - 10) {
growBuffer(buf);
}
if (ent->content != NULL)
buf[len++] = ent->content[0];
}