mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-14 09:58:17 +00:00
Fix off-by-1 read err in switch_xml
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12628 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -2035,7 +2035,7 @@ static char *switch_xml_toxml_r(switch_xml_t xml, char **s, switch_size_t *len,
|
||||
*s = tmp;
|
||||
}
|
||||
|
||||
if (*(*s + (*len) - 1) == '>') {
|
||||
if (*len && *(*s + (*len) - 1) == '>') {
|
||||
*len += sprintf(*s + *len, "\n"); /* indent */
|
||||
}
|
||||
for (lcount = 0; lcount < *count; lcount++) {
|
||||
|
Reference in New Issue
Block a user