[sr-dev] git:master:4c709004: core: fix out of bounds write, related to commits 776d0d6bb1086 and dc2acb895538

Henning Westerholt hw at skalatan.de
Fri Sep 20 11:33:13 CEST 2019


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

Author: Henning Westerholt <hw at skalatan.de>
Committer: Henning Westerholt <hw at skalatan.de>
Date: 2019-09-20T11:31:50+02:00

core: fix out of bounds write, related to commits 776d0d6bb1086 and dc2acb895538

---

Modified: src/core/core_cmd.c
Modified: src/core/select_core.c

---

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

---

diff --git a/src/core/core_cmd.c b/src/core/core_cmd.c
index 717e240fde..6a32b2f932 100644
--- a/src/core/core_cmd.c
+++ b/src/core/core_cmd.c
@@ -224,7 +224,7 @@ static const char* dst_blst_stats_get_doc[] = {
 #endif
 
 
-#define MAX_CTIME_LEN 25
+#define MAX_CTIME_LEN 26
 
 /* up time */
 static char up_since_ctime[MAX_CTIME_LEN];
diff --git a/src/core/select_core.c b/src/core/select_core.c
index 6190c8b875..029f880a48 100644
--- a/src/core/select_core.c
+++ b/src/core/select_core.c
@@ -1565,7 +1565,7 @@ int select_sys_now_fmt(str* res, select_t* s, struct sip_msg* msg)
 			return -1;
 	}
 	if (s->n <= SEL_POS+1) {
-		char buff[25];
+		char buff[26];
 		if (! asctime_r(&tm, buff)) {
 			ERR("Invalid time value\n");
 			return -1;




More information about the sr-dev mailing list