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

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
Date: 2026-06-10T10:45:12+02:00

kamcmd: check the length for reply_socket to fit terminating 0

---

Modified: utils/kamcmd/kamcmd.c

---

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

---

diff --git a/utils/kamcmd/kamcmd.c b/utils/kamcmd/kamcmd.c
index 24f103ca552..9445bcf7789 100644
--- a/utils/kamcmd/kamcmd.c
+++ b/utils/kamcmd/kamcmd.c
@@ -476,7 +476,7 @@ int connect_unix_sock(char *name, int type)
                                goto error;
                        }
                } else {
-                       if(strlen(reply_socket) > UNIX_PATH_MAX) {
+                       if(strlen(reply_socket) >= UNIX_PATH_MAX) {
                                fprintf(stderr,
                                                "ERROR: buffer overflow while 
trying to"
                                                "use the provided unix datagram 
socket name (%s)",

_______________________________________________
Kamailio - Development Mailing List -- [email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to