Module: kamailio
Branch: master
Commit: d224cc5da7858fb99db64ec26fe3bd8acb0cadfc
URL:
https://github.com/kamailio/kamailio/commit/d224cc5da7858fb99db64ec26fe3bd8…
Author: Arsen Semenov <arsperger(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2021-09-01T12:32:54+02:00
slack: allocate zeroed memory for send_data
---
Modified: src/modules/slack/slack.c
---
Diff:
https://github.com/kamailio/kamailio/commit/d224cc5da7858fb99db64ec26fe3bd8…
Patch:
https://github.com/kamailio/kamailio/commit/d224cc5da7858fb99db64ec26fe3bd8…
---
diff --git a/src/modules/slack/slack.c b/src/modules/slack/slack.c
index acb724861b..906e824bee 100644
--- a/src/modules/slack/slack.c
+++ b/src/modules/slack/slack.c
@@ -116,7 +116,7 @@ static int _curl_send(const char* uri, str *post_data)
LM_ERR("Error: snprintf error in calculating buffer size\n");
return -1;
}
- send_data = (char*)pkg_malloc((datasz+1)*sizeof(char));
+ send_data = (char*)pkg_mallocxz((datasz+1)*sizeof(char));
if(send_data==NULL) {
LM_ERR("Error: can not allocate pkg memory [%d] bytes\n", datasz);
return -1;