[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [xml] Regarding Malloc Failure Handling--Patch for Parser.c
- From: Daniel Veillard <veillard redhat com>
- To: Ashwin <ashwins huawei com>
- Cc: xml gnome org, ranjit huawei com
- Subject: Re: [xml] Regarding Malloc Failure Handling--Patch for Parser.c
- Date: Thu, 3 Apr 2008 02:24:43 -0400
On Thu, Apr 03, 2008 at 10:52:58AM +0800, Ashwin wrote:
> > so I applied manually all changes, modifying a few things, might be worth
> > re-checking from SVN head (rev 3720),
>
> I think this one is missed out
>
> *************** xmlParseAttValueComplex(xmlParserCtxtPtr
> *** 3280,3286 ****
> }
> } else if ((ent != NULL) &&
> (ctxt->replaceEntities != 0)) {
> ! xmlChar *rep;
>
> if (ent->etype != XML_INTERNAL_PREDEFINED_ENTITY) {
> rep = xmlStringDecodeEntities(ctxt, ent->content,
> --- 3297,3303 ----
> }
> } else if ((ent != NULL) &&
> (ctxt->replaceEntities != 0)) {
> !
>
> if (ent->etype != XML_INTERNAL_PREDEFINED_ENTITY) {
> rep = xmlStringDecodeEntities(ctxt, ent->content,
>
> The xmlChar *rep decl is right at the beginning of the function and needs to
> be removed from here....
Strange, I don't see this here:
paphio:~/XML -> grep -C 4 'if (ent->etype != XML_INTERNAL_PREDEFINED_ENTITY) {' parser.c
buf[len++] = ent->content[0];
}
} else if ((ent != NULL) &&
(ctxt->replaceEntities != 0)) {
if (ent->etype != XML_INTERNAL_PREDEFINED_ENTITY) {
rep = xmlStringDecodeEntities(ctxt, ent->content,
XML_SUBSTITUTE_REF,
0, 0, 0);
if (rep != NULL) {
paphio:~/XML ->
But I found another one in that code.
> And in the patch I sent for realloc, the null check for realloc is still
> being done for the original pointer rather than against the temp pointer for
> the functions nsPush and spacePush, it was an oversight on my part...Sorry
> about that!
Okay, should be fixed, check again revision 3724.
thanks !
Daniel
--
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard | virtualization library http://libvirt.org/
veillard redhat com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]