From: Travis Cross Date: Sun, 24 Jun 2012 07:34:48 +0000 (+0000) Subject: Fix use of switch_event_add_body X-Git-Tag: v1.2.0~267 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f1183ef97049c5757ae545cf4464c58238a99616;p=thirdparty%2Ffreeswitch.git Fix use of switch_event_add_body On some compilers this fixes the build. gcc reports: error: format not a string literal and no format arguments clang reports: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security] --- diff --git a/src/mod/applications/mod_spandsp/mod_spandsp_dsp.c b/src/mod/applications/mod_spandsp/mod_spandsp_dsp.c index 8eb8092c1e..b01a4638a3 100644 --- a/src/mod/applications/mod_spandsp/mod_spandsp_dsp.c +++ b/src/mod/applications/mod_spandsp/mod_spandsp_dsp.c @@ -121,7 +121,7 @@ static void put_text_msg(void *user_data, const uint8_t *msg, int len) switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "proto", "tdd"); switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "subject", "TDD MESSAGE"); switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Unique-ID", switch_core_session_get_uuid(pvt->session)); - switch_event_add_body(event, (char *)msg); + switch_event_add_body(event, "%s", (char *)msg); if (switch_core_session_get_partner(pvt->session, &other_session) == SWITCH_STATUS_SUCCESS) {