]> git.ipfire.org Git - thirdparty/freeswitch.git/commit
Deal with read errors in switch_xml.c
authorTravis Cross <tc@traviscross.com>
Fri, 28 Feb 2014 17:19:43 +0000 (17:19 +0000)
committerTravis Cross <tc@traviscross.com>
Sun, 2 Mar 2014 10:36:14 +0000 (10:36 +0000)
commitfdee9d940a324af70d55e4edf7256fbfb8902f6a
tree0040bd01938d9c4fa02312af656372da06c3264c
parenta1b536be3ad1c672b9316614ef87a2f8ae5f226f
Deal with read errors in switch_xml.c

Unlike fread(3), read(3) will return -1 on error.  We were assigning
the result of read to a potentially unsigned variable, and passing the
result down to switch_xml_parse_str() where it would end up
determining how many bytes to malloc(3).
src/switch_xml.c