mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-14 07:14:14 +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:
1 parent
16009c5094
commit
53ab0e2aef
6 files changed
+9
-11
No files matched your search
+1
-1
@@ -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