mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-30 22:43:14 +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:
@ -1,3 +1,10 @@
|
|||||||
|
Tue Mar 20 12:22:36 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
|
||||||
|
|
||||||
|
* 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
|
||||||
|
|
||||||
Mon Mar 19 16:50:52 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
|
Mon Mar 19 16:50:52 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
|
||||||
|
|
||||||
* xpath.[ch]: still a lot of cleanup based on XSLT, added
|
* xpath.[ch]: still a lot of cleanup based on XSLT, added
|
||||||
|
6
parser.c
6
parser.c
@ -2156,6 +2156,9 @@ xmlParseAttValue(xmlParserCtxtPtr ctxt) {
|
|||||||
buf[len++] = *current++;
|
buf[len++] = *current++;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (len > buf_size - 10) {
|
||||||
|
growBuffer(buf);
|
||||||
|
}
|
||||||
len += xmlCopyChar(0, &buf[len], val);
|
len += xmlCopyChar(0, &buf[len], val);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -2178,6 +2181,9 @@ xmlParseAttValue(xmlParserCtxtPtr ctxt) {
|
|||||||
xmlFree(rep);
|
xmlFree(rep);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (len > buf_size - 10) {
|
||||||
|
growBuffer(buf);
|
||||||
|
}
|
||||||
if (ent->content != NULL)
|
if (ent->content != NULL)
|
||||||
buf[len++] = ent->content[0];
|
buf[len++] = ent->content[0];
|
||||||
}
|
}
|
||||||
|
2
result/attrib.xml
Normal file
2
result/attrib.xml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<item title="Icrontic.com - Warning: Breakdancing midget with tourette's syndrome on-board                                                " url="http://www.icrontic.com/" first_time="985034339" last_time="985034339" visits="1"/>
|
2
result/noent/attrib.xml
Normal file
2
result/noent/attrib.xml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<item title="Icrontic.com - Warning: Breakdancing midget with tourette's syndrome on-board                                                " url="http://www.icrontic.com/" first_time="985034339" last_time="985034339" visits="1"/>
|
1
test/attrib.xml
Normal file
1
test/attrib.xml
Normal file
@ -0,0 +1 @@
|
|||||||
|
<item title="Icrontic.com - Warning: Breakdancing midget with tourette's syndrome on-board                                                " url="http://www.icrontic.com/" first_time="985034339" last_time="985034339" visits="1"/>
|
Reference in New Issue
Block a user