[sr-dev] git:5.5:5d05de90: presence: fixed format-truncation warning GH #3013

Daniel-Constantin Mierla miconda at gmail.com
Mon Feb 14 15:03:43 CET 2022


Module: kamailio
Branch: 5.5
Commit: 5d05de900de0145a22a5bf044267d9b0c0ceb712
URL: https://github.com/kamailio/kamailio/commit/5d05de900de0145a22a5bf044267d9b0c0ceb712

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

presence: fixed format-truncation warning GH #3013

(cherry picked from commit c1b14f49ead9a29711cde5334155819cd1c6c90d)

---

Modified: src/modules/presence/presence.c

---

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

---

diff --git a/src/modules/presence/presence.c b/src/modules/presence/presence.c
index 09751bbc15..98c0711d0b 100644
--- a/src/modules/presence/presence.c
+++ b/src/modules/presence/presence.c
@@ -564,8 +564,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