Module: kamailio
Branch: master
Commit: 413b6d572683c0d8e7a40f0788d881112b5a1aa2
URL:
https://github.com/kamailio/kamailio/commit/413b6d572683c0d8e7a40f0788d8811…
Author: Jan Janak <janakj(a)cs.columbia.edu>
Committer: GitHub <noreply(a)github.com>
Date: 2019-04-19T16:13:44-04:00
Fix incorrect length of static string
This change fixes Coverity bug "185775 Out-of-bounds access".
---
Modified: src/modules/imc/imc_cmd.c
---
Diff:
https://github.com/kamailio/kamailio/commit/413b6d572683c0d8e7a40f0788d8811…
Patch:
https://github.com/kamailio/kamailio/commit/413b6d572683c0d8e7a40f0788d8811…
---
diff --git a/src/modules/imc/imc_cmd.c b/src/modules/imc/imc_cmd.c
index 391c7840a0..2dd6d834db 100644
--- a/src/modules/imc/imc_cmd.c
+++ b/src/modules/imc/imc_cmd.c
@@ -991,9 +991,9 @@ int imc_handle_rooms(struct sip_msg* msg, imc_cmd_t *cmd,
p = imc_body_buf;
left = IMC_BUF_SIZE;
- memcpy(p, "Rooms:\n", 9);
- p += 9;
- left -= 9;
+ memcpy(p, "Rooms:\n", 7);
+ p += 7;
+ left -= 7;
for (i = 0; i < imc_hash_size; i++) {
lock_get(&_imc_htable[i].lock);