From cb02238bb98470b412faf990a9411182dc8f195c Mon Sep 17 00:00:00 2001 From: Shane Alcock Date: Tue, 19 Nov 2024 10:12:51 +1300 Subject: [PATCH] SIP: fix crash when SDP address is NULL but SDP username is not --- src/collector/collector_sync_voip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/collector/collector_sync_voip.c b/src/collector/collector_sync_voip.c index d05c792..a9218b4 100644 --- a/src/collector/collector_sync_voip.c +++ b/src/collector/collector_sync_voip.c @@ -1430,7 +1430,7 @@ static int update_sip_state(collector_sync_voip_t *sync, } if (sessuser != NULL) { - strncpy(sdpo.username, sessaddr, sizeof(sdpo.username) - 1); + strncpy(sdpo.username, sessuser, sizeof(sdpo.username) - 1); } else { strncpy(sdpo.username, "unknown", sizeof(sdpo.username) - 1); }