summaryrefslogtreecommitdiff
path: root/tests/xml.c
Commit message (Collapse)AuthorAgeFilesLines
* xml: Don't crash parsing empty XML stringChristophe Fergeau2017-10-181-0/+6
| | | | | | | | | 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
* tests/xml: Fix various leaksChristophe Fergeau2016-06-201-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes: ==16342== 93 (64 direct, 29 indirect) bytes in 1 blocks are definitely lost in loss record 211 of 278 ==16342== at 0x4C2BBAD: malloc (vg_replace_malloc.c:299) ==16342== by 0x5F5CE58: g_malloc (gmem.c:94) ==16342== by 0x5F73D42: g_slice_alloc (gslice.c:1025) ==16342== by 0x5F7436D: g_slice_alloc0 (gslice.c:1051) ==16342== by 0x56DA77A: soup_uri_new_with_base (soup-uri.c:283) ==16342== by 0x56DAA42: soup_uri_new (soup-uri.c:519) ==16342== by 0x4E48BB5: oauth2_proxy_extract_access_token (oauth2-proxy.c:384) ==16342== by 0x4009E6: test_url_fragment_no_access_token (oauth2.c:36) ==16342== by 0x5F7C983: test_case_run (gtestutils.c:2158) ==16342== by 0x5F7C983: g_test_run_suite_internal (gtestutils.c:2241) ==16342== by 0x5F7CB4E: g_test_run_suite_internal (gtestutils.c:2253) ==16342== by 0x5F7CD5D: g_test_run_suite (gtestutils.c:2328) ==16342== by 0x5F7CD80: g_test_run (gtestutils.c:1596) ==16342== by 0x400B64: main (oauth2.c:65) ==16342== ==16342== 133 (64 direct, 69 indirect) bytes in 1 blocks are definitely lost in loss record 262 of 278 ==16342== at 0x4C2BBAD: malloc (vg_replace_malloc.c:299) ==16342== by 0x5F5CE58: g_malloc (gmem.c:94) ==16342== by 0x5F73D42: g_slice_alloc (gslice.c:1025) ==16342== by 0x5F7436D: g_slice_alloc0 (gslice.c:1051) ==16342== by 0x56DA77A: soup_uri_new_with_base (soup-uri.c:283) ==16342== by 0x56DAA42: soup_uri_new (soup-uri.c:519) ==16342== by 0x4E48BB5: oauth2_proxy_extract_access_token (oauth2-proxy.c:384) ==16342== by 0x400A25: test_access_token_simple (oauth2.c:44) ==16342== by 0x5F7C983: test_case_run (gtestutils.c:2158) ==16342== by 0x5F7C983: g_test_run_suite_internal (gtestutils.c:2241) ==16342== by 0x5F7CB4E: g_test_run_suite_internal (gtestutils.c:2253) ==16342== by 0x5F7CD5D: g_test_run_suite (gtestutils.c:2328) ==16342== by 0x5F7CD80: g_test_run (gtestutils.c:1596) ==16342== by 0x400B64: main (oauth2.c:65) ==16342== ==16342== 137 (64 direct, 73 indirect) bytes in 1 blocks are definitely lost in loss record 263 of 278 ==16342== at 0x4C2BBAD: malloc (vg_replace_malloc.c:299) ==16342== by 0x5F5CE58: g_malloc (gmem.c:94) ==16342== by 0x5F73D42: g_slice_alloc (gslice.c:1025) ==16342== by 0x5F7436D: g_slice_alloc0 (gslice.c:1051) ==16342== by 0x56DA77A: soup_uri_new_with_base (soup-uri.c:283) ==16342== by 0x56DAA42: soup_uri_new (soup-uri.c:519) ==16342== by 0x4E48BB5: oauth2_proxy_extract_access_token (oauth2-proxy.c:384) ==16342== by 0x400A97: test_url_encoding_access_token (oauth2.c:51) ==16342== by 0x5F7C983: test_case_run (gtestutils.c:2158) ==16342== by 0x5F7C983: g_test_run_suite_internal (gtestutils.c:2241) ==16342== by 0x5F7CB4E: g_test_run_suite_internal (gtestutils.c:2253) ==16342== by 0x5F7CD5D: g_test_run_suite (gtestutils.c:2328) ==16342== by 0x5F7CD80: g_test_run (gtestutils.c:1596) ==16342== by 0x400B64: main (oauth2.c:65)
* Remove all GLIB_CHECK_VERSION usesTimm Bäder2016-06-161-4/+0
| | | | Where the checked version is < 2.36, which we now require
* tests: Remove more unused variables/codeChristophe Fergeau2014-09-031-1/+0
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=735921
* tests: Don't call g_type_init() on newer glibChristophe Fergeau2014-09-031-0/+2
| | | | | | This is deprecated and causes a compile warning https://bugzilla.gnome.org/show_bug.cgi?id=735921
* Drop obsolete g_thread_init()Martin Pitt2012-06-161-1/+0
| | | | | | | | | | Since version 2.2 g_type_init() initializes also the thread system so g_thread_init() is not required anymore. It is deprecated since glib 2.31. Bump glib requirement accordingly. https://bugzilla.gnome.org/show_bug.cgi?id=650061
* xml-node: API for manually constructing and outputting XMLTomas Frydrych2011-02-101-0/+85
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