[sr-dev] git:master:413b6d57: Fix incorrect length of static string
GitHub
noreply at github.com
Fri Apr 19 22:13:48 CEST 2019
Module: kamailio
Branch: master
Commit: 413b6d572683c0d8e7a40f0788d881112b5a1aa2
URL: https://github.com/kamailio/kamailio/commit/413b6d572683c0d8e7a40f0788d881112b5a1aa2
Author: Jan Janak <janakj at cs.columbia.edu>
Committer: GitHub <noreply at 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/413b6d572683c0d8e7a40f0788d881112b5a1aa2.diff
Patch: https://github.com/kamailio/kamailio/commit/413b6d572683c0d8e7a40f0788d881112b5a1aa2.patch
---
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);
More information about the sr-dev
mailing list