Skip to content
Commit e6b97476 authored by David Kilzer's avatar David Kilzer Committed by Daniel Veillard
Browse files

Bug 758572: ASAN crash in make check <https://bugzilla.gnome.org/show_bug.cgi?id=758572>

Instead of sending a random string length into API methods,
compute the string length properly to fix out-of-bounds accesses
caught with AddressSanitizer turned on.

* testapi.c:
(test_htmlCreateMemoryParserCtxt):
(test_htmlCreatePushParserCtxt):
(test_htmlCtxtReadMemory):
(test_htmlParseChunk):
(test_htmlReadMemory):
(test_xmlDictExists):
(test_xmlDictLookup):
(test_xmlCreatePushParserCtxt):
(test_xmlCtxtReadMemory):
(test_xmlCtxtResetPush):
(test_xmlParseChunk):
(test_xmlParseInNodeContext):
(test_xmlParseMemory):
(test_xmlReadMemory):
(test_xmlRecoverMemory):
(test_xmlSAXParseMemory):
(test_xmlSAXParseMemoryWithData):
(test_xmlSAXUserParseMemory):
(test_xmlCreateMemoryParserCtxt):
(test_xmlRelaxNGNewMemParserCtxt):
(test_xmlBufferAdd):
(test_xmlBufferAddHead):
(test_xmlBuildQName):
(test_xmlDocDumpFormatMemory):
(test_xmlDocDumpFormatMemoryEnc):
(test_xmlDocDumpMemory):
(test_xmlNewCDataBlock):
(test_xmlNewDocTextLen):
(test_xmlNewTextLen):
(test_xmlNodeAddContentLen):
(test_xmlNodeSetContentLen):
(test_xmlSplitQName3):
(test_xmlStringLenGetNodeList):
(test_xmlTextConcat):
(test_xmlOutputBufferWrite):
(test_xmlParserInputBufferCreateMem):
(test_xmlParserInputBufferCreateStatic):
(test_xmlParserInputBufferPush):
(test_xmlReaderForMemory):
(test_xmlReaderNewMemory):
(test_xmlSchemaNewMemParserCtxt):
(test_xmlCharStrndup):
(test_xmlStrncatNew):
(test_xmlStrncmp):
(test_xmlStrndup):
(test_xmlStrsub):
(test_xmlTextWriterWriteBase64):
(test_xmlTextWriterWriteBinHex):
(test_xmlTextWriterWriteRawLen):
parent 783931fc
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment