Module: kamailio Branch: master Commit: 413b6d572683c0d8e7a40f0788d881112b5a1aa2 URL: https://github.com/kamailio/kamailio/commit/413b6d572683c0d8e7a40f0788d88111...
Author: Jan Janak janakj@cs.columbia.edu Committer: GitHub noreply@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/413b6d572683c0d8e7a40f0788d88111... Patch: https://github.com/kamailio/kamailio/commit/413b6d572683c0d8e7a40f0788d88111...
---
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);
Hello Jan,
many thanks for the fix. One small remark, can you please adapt the commit message next time to preferred format. E.g.:
imc: fix incorrect length of static string
- fix incorrect length of static string
- related to Coverity bug "185775 Out-of-bounds access".
This makes it much easier to understand the Changelog etc.. Details can be found in our contributing document:
https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md
Thanks and regards,
Henning
Am 19.04.19 um 22:13 schrieb GitHub:
Module: kamailio Branch: master Commit: 413b6d572683c0d8e7a40f0788d881112b5a1aa2 URL: https://github.com/kamailio/kamailio/commit/413b6d572683c0d8e7a40f0788d88111...
Author: Jan Janak janakj@cs.columbia.edu Committer: GitHub noreply@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/413b6d572683c0d8e7a40f0788d88111... Patch: https://github.com/kamailio/kamailio/commit/413b6d572683c0d8e7a40f0788d88111...
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);
Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev