summaryrefslogtreecommitdiff
path: root/rest/rest-xml-parser.c
Commit message (Collapse)AuthorAgeFilesLines
* xml: Don't crash parsing empty XML stringChristophe Fergeau2017-10-181-0/+3
| | | | | | | | | Calling rest_xml_parser_parse_from_data() with an empty string ("") currently causes a crash as xmlReaderForMemory() returns NULL in that case, and we then try to dereference this pointer without checking it's non-NULL. https://bugzilla.gnome.org/show_bug.cgi?id=789053
* Add more missing precondition checksTimm Bäder2016-07-141-0/+1
|
* rest-xml-parser: Ignore text content at the top-level of a documentPhilip Withnall2015-04-141-3/+9
| | | | | | | | This prevents a crash due to cur_node being NULL. Found by scan-build. https://bugzilla.gnome.org/show_bug.cgi?id=719550
* Don't dump XML parsing errors to stderr/stdout by defaultChristophe Fergeau2015-03-161-0/+10
| | | | These errors should only be shown if REST_DEBUG=xml-parser is set.
* xml-parser: Add missing break in switch statementRob Bradford2014-09-191-0/+1
| | | | | This would result in an inappropriate debug message appearing on valid text data.
* Accept -1 len in rest_xml_parser_parse_from_dataChristophe Fergeau2012-06-171-1/+5
| | | | | | | This means that the passed in string is nul-terminated and that rest_xml_parser_parse_from_data should get its length with strlen. https://bugzilla.gnome.org/show_bug.cgi?id=657032
* xml-node: API for manually constructing and outputting XMLTomas Frydrych2011-02-101-212/+3
| | | | | | | | | | | | | Split out RestXmlNode into separate source files and added simple API for manually constructing tree of RextXmlNodes and converting such a tree to a string: * xml_node_add_child() * xml_node_add_attribute() * xml_node_set_content() * xml_node_print() Includes xml test for make check
* xml-parser: Remove unused variablelibrest-0.7.4Rob Bradford2010-09-131-1/+0
|
* xml-parser: Remove unread 'res' variableRob Bradford2010-09-061-2/+2
| | | | | We never read from this variable apart from in the loop so we can instead simply compare the result of the function.
* xml-parser: Clear the stack in rest_xml_node_findRob Bradford2010-08-191-0/+2
|
* xml-parser: Fix rest_xml_node_unref so that is correctly unrefs siblingsRob Bradford2010-08-191-28/+28
|
* proxy/proxy-call/xml-parser: Guard public function entry pointsRob Bradford2010-04-151-0/+5
| | | | Fixes: http://bugzilla.meego.com/show_bug.cgi?id=273
* rest-xml-parser: Remove redundant GObject methodsRoss Burton2010-04-131-40/+0
|
* rest-xml-parser: Remove pointless private structRoss Burton2010-04-131-35/+22
|
* rest-xml-parser: Remove duplicate free for the reader in finalizeRob Bradford2010-04-061-2/+0
|
* rest-xml-parser: Free the textReader after we close itRob Bradford2010-03-241-0/+1
| | | | | | | | | | | | | | | | | | | | | This resolves the following leak: ==10948== 43,296 (672 direct, 42,624 indirect) bytes in 2 blocks are definitely lost in loss record 109 of 124 ==10948== at 0x4C2391E: malloc (vg_replace_malloc.c:207) ==10948== by 0x71460DA: xmlNewTextReader (in /usr/lib/libxml2.so.2.7.4) ==10948== by 0x71465A1: xmlReaderForMemory (in /usr/lib/libxml2.so.2.7.4) ==10948== by 0x6C4FF5D: rest_xml_parser_parse_from_data (rest-xml-parser.c:345) ==10948== by 0xB2211C4: node_from_call (twitter.c:142) ==10948== by 0xB221E5B: verify_cb (twitter.c:487) ==10948== by 0x6C4EF78: _call_async_finished_cb (rest-proxy-call.c:557) ==10948== by 0x5BC43EC: g_closure_invoke (gclosure.c:767) ==10948== by 0x5BD7CDA: signal_emit_unlocked_R (gsignal.c:3247) ==10948== by 0x5BD9081: g_signal_emit_valist (gsignal.c:2980) ==10948== by 0x5BD9552: g_signal_emit (gsignal.c:3037) ==10948== by 0x56E8FAE: soup_message_io_finished (soup-message-io.c:177) ==10948==
* Make rest_xml_node_new private until it's usefulRoss Burton2009-05-151-1/+1
|
* Document rest-xml-parserRoss Burton2009-05-151-0/+53
|
* Add license header.Rob Bradford2009-01-151-0/+22
|
* Make RestXmlNode ref counted, and add a boxed gtypeRoss Burton2008-12-181-31/+61
|
* Free the siblings of a node when that node is freed.Rob Bradford2008-11-181-10/+30
|
* Intern tag names in the children hashRoss Burton2008-11-171-5/+7
|
* Use the same key when we add an existing nodeRoss Burton2008-11-171-1/+1
|
* Use static GQueues in rest_xml_parser_parse_from_dataRoss Burton2008-11-171-5/+4
|
* Use static GQueues in rest_xml_node_findRoss Burton2008-11-171-6/+4
|
* Don't leak a GList in rest_xml_node_freeRoss Burton2008-11-171-1/+3
|
* Reverse the list of siblings of children nodes so that the are in order.Rob Bradford2008-09-181-1/+44
|
* Use the XML element name instead of just the local name. A hack but it ↵Ross Burton2008-09-041-1/+1
| | | | works for now with namespaced documents
* Use goffset instead of gssize for payload lengthsRoss Burton2008-09-041-1/+1
|
* Cast out the libxml2 string results.Rob Bradford2008-09-031-6/+8
|
* Make the hash table populate function void (Ross Burton)Rob Bradford2008-09-031-4/+4
|
* Switch the XML parser over to use the new debugging api.Rob Bradford2008-09-011-12/+16
|
* Add _find and _get_attrs to the parser APIRob Bradford2008-09-011-0/+38
|
* Add an XML parser that parses XML into a simple structureRob Bradford2008-08-221-0/+250