Re: [xml] Segmentation fault in xmlSAX2StartElementNs/nodePush

Title: RE: [xml] Segmentation fault in xmlSAX2StartElementNs/nodePush

Neil Youngman wrote:


> If I don't set context->userData then the crash goes away.
> Is there anything obviously stupid in that code, or a known bug that I'm tripping over because my libxml2 library is too old?

to answer a part of that question, with libxml2-2.7.6, it still crashes and valgrind gives me:

==8250== Invalid write of size 4
==8250==    at 0x8072A6B: nodePush (parser.c:1574)
==8250==    by 0x80E8788: xmlSAX2StartElementNs (SAX2.c:2252)
==8250==    by 0x807A313: xmlParseStartTag2 (parser.c:9111)
==8250==    by 0x80860D3: xmlParseElement (parser.c:9458)
==8250==  Address 0x3442D948 is 0 bytes after a block of size 0 alloc'd
==8250==    at 0x3414A23C: malloc (vg_replace_malloc.c:131)
==8250==    by 0x3414AC2B: realloc (vg_replace_malloc.c:189)
==8250==    by 0x8072ABF: nodePush (parser.c:1556)
==8250==    by 0x80E8788: xmlSAX2StartElementNs (SAX2.c:2252)

Neil Youngman

Neil Youngman 
Wirefast Limited

Wirefast provides secure corporate messaging services.
See our messaging solutions at

Please consider the environment.
Does this email or attachment need to be printed?

This message contains confidential information and is intended only
for the individual named. If you are not the named addressee you
should not disseminate, distribute or copy this email. Please
notify the sender immediately by email if you have received this
email by mistake and delete this email from your system.

Email transmission cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses. The sender therefore
does not accept liability for any errors or omissions in the contents
of this message which arise as a result of email transmission.
Wirefast Limited is registered in England & Wales
Company number: 03865860
Registered Office: 7/10 Chandos Street, Cavendish Square, London, W1G 9DQ

Attachment: logo.jpg
Description: logo.jpg

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]