[commit] r8507 - freeswitch/trunk/src/mod/xml_int/mod_xml_cdr
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);
participants (1)
-
Freeswitch SVN