<p></p>
<p><b>@arsperger</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/kamailio/kamailio/pull/2838#discussion_r699009988">src/modules/slack/slack.c</a>:</p>
<pre style='color:#555'>> + */
+static int _curl_send(const char* uri, str *post_data)
+{
+       int datasz;
+       char* send_data;
+       CURL *curl_handle;
+       CURLcode res;
+       // LM_DBG("sending to[%s]\n", uri);
+
+       datasz = snprintf(NULL, 0, BODY_FMT, slack_channel, slack_username, post_data->s, slack_icon);
+       send_data = (char*)pkg_malloc((datasz+1)*sizeof(char));
+       if(send_data==NULL) {
+        LM_ERR("Error: can not allocate pkg memory [%d] bytes\n", datasz);
+        return -1;
+    }
+    snprintf(send_data, datasz+1, BODY_FMT, slack_channel, slack_username, post_data->s, slack_icon);
</pre>
<p>thank you for your notes. I am wondering, if the above snprintf check is passed, what could be a reason for this one to fail? do we really need to error check this one?</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/pull/2838#discussion_r699009988">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZKJLVN6CGMX4372EITT7RWWDANCNFSM5DB7SIMA">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub">Android</a>.
<img src="https://github.com/notifications/beacon/ABO7UZLC7E5Z4NPIKN6E5PLT7RWWDA5CNFSM5DB7SIMKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOFQ7L4HI.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/pull/2838#discussion_r699009988",
"url": "https://github.com/kamailio/kamailio/pull/2838#discussion_r699009988",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>