[Freeswitch-svn] [commit] r8507 - freeswitch/trunk/src/mod/xml_int/mod_xml_cdr
Freeswitch SVN
stkn at freeswitch.org
Wed May 21 16:05:46 EDT 2008
Author: stkn
Date: Wed May 21 16:05:46 2008
New Revision: 8507
Modified:
freeswitch/trunk/src/mod/xml_int/mod_xml_cdr/mod_xml_cdr.c
Log:
sizeof does not work for dynamically allocated memory (Klocwork #532)
Modified: freeswitch/trunk/src/mod/xml_int/mod_xml_cdr/mod_xml_cdr.c
==============================================================================
--- freeswitch/trunk/src/mod/xml_int/mod_xml_cdr/mod_xml_cdr.c (original)
+++ freeswitch/trunk/src/mod/xml_int/mod_xml_cdr/mod_xml_cdr.c Wed May 21 16:05:46 2008
@@ -130,7 +130,7 @@
xml_text_escaped = malloc(need_bytes);
switch_assert(xml_text_escaped);
- memset(xml_text_escaped, 0, sizeof(xml_text_escaped));
+ memset(xml_text_escaped, 0, need_bytes);
if (globals.encode == 1) {
headers = curl_slist_append(headers, "Content-Type: application/x-www-form-urlencoded");
switch_url_encode(xml_text, xml_text_escaped, need_bytes - 1);
More information about the Freeswitch-svn
mailing list