From 01d3b3c0e354abb20a33fc613f1985db4cee29d1 Mon Sep 17 00:00:00 2001 From: Tomasz Ostrowski <43222462+tomek-o@users.noreply.github.com> Date: Thu, 23 Mar 2023 19:15:41 +0100 Subject: [PATCH] [Core] ICE: fix wrong buffer size being passed and unitialized buffer --- src/switch_rtp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/switch_rtp.c b/src/switch_rtp.c index e8a3d30da1..17f3e66f8c 100644 --- a/src/switch_rtp.c +++ b/src/switch_rtp.c @@ -4764,11 +4764,12 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_activate_ice(switch_rtp_t *rtp_sessio if ((type & ICE_VANILLA)) { switch_snprintf(ice_user, sizeof(ice_user), "%s:%s", login, rlogin); switch_snprintf(user_ice, sizeof(user_ice), "%s:%s", rlogin, login); - switch_snprintf(luser_ice, sizeof(user_ice), "%s%s", rlogin, login); + switch_snprintf(luser_ice, sizeof(luser_ice), "%s%s", rlogin, login); ice->ready = ice->rready = 0; } else { switch_snprintf(ice_user, sizeof(ice_user), "%s%s", login, rlogin); switch_snprintf(user_ice, sizeof(user_ice), "%s%s", rlogin, login); + switch_snprintf(luser_ice, sizeof(luser_ice), ""); ice->ready = ice->rready = 1; }