[sr-dev] git:master:c1b14f49: presence: fixed format-truncation warning GH #3013

Daniel-Constantin Mierla miconda at gmail.com
Mon Feb 7 21:47:00 CET 2022


Module: kamailio
Branch: master
Commit: c1b14f49ead9a29711cde5334155819cd1c6c90d
URL: https://github.com/kamailio/kamailio/commit/c1b14f49ead9a29711cde5334155819cd1c6c90d

Author: Sergey Safarov <s.safarov at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2022-02-07T21:46:57+01:00

presence: fixed format-truncation warning GH #3013

---

Modified: src/modules/presence/presence.c

---

Diff:  https://github.com/kamailio/kamailio/commit/c1b14f49ead9a29711cde5334155819cd1c6c90d.diff
Patch: https://github.com/kamailio/kamailio/commit/c1b14f49ead9a29711cde5334155819cd1c6c90d.patch

---

diff --git a/src/modules/presence/presence.c b/src/modules/presence/presence.c
index da253acbac..d6e287c40e 100644
--- a/src/modules/presence/presence.c
+++ b/src/modules/presence/presence.c
@@ -566,8 +566,8 @@ static int child_init(int rank)
 		int i;
 
 		for(i = 0; i < pres_notifier_processes; i++) {
-			char tmp[21];
-			snprintf(tmp, 21, "PRESENCE NOTIFIER %d", i);
+			char tmp[30];
+			snprintf(tmp, 30, "PRESENCE NOTIFIER %d", i);
 			pres_notifier_id[i] = i;
 
 			if(fork_basic_utimer(PROC_TIMER, tmp, 1, pres_timer_send_notify,




More information about the sr-dev mailing list