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

<hr>

<p>In <a href="https://github.com/kamailio/kamailio/pull/2873#discussion_r725258008">src/modules/tls/tls_util.h</a>:</p>
<pre style='color:#555'>> @@ -39,7 +39,11 @@ static inline int tls_err_ret(char *s, tls_domains_cfg_t **tls_domains_cfg) {
        {
                while((err = ERR_get_error())) {
                        ret = 1;
-                       ERR("%s%s\n", s ? s : "", ERR_error_string(err, 0));
+                       char *errbuf = (char*)malloc(sizeof(char)*((*tls_domains_cfg)->srv_default->server_name.len+1));
+                       memcpy(errbuf, (*tls_domains_cfg)->srv_default->server_name.s, (*tls_domains_cfg)->srv_default->server_name.len);
+                       errbuf[(*tls_domains_cfg)->srv_default->server_name.len] = '\0';
+                       ERR("%s%s -> %s -> verify_client is:%d\n", s ? s : "", ERR_error_string(err, 0), errbuf, (*tls_domains_cfg)->srv_default->verify_client);
+                       free(errbuf);
</pre>
<p>There is no need to allocate memory and copy to it a 0-terminated string from <code>(*tls_domains_cfg)->srv_default->server_name</code>, you can use <code>%.*s</code> instead of <code>%s</code> and provide first the length and then the pointer. Should be plenty of examples in Kamailio code.</p>
<p>Then, because the patch is to tls module, the commit message has to be prefixed with <code>tls: </code> -- see contributing guidelines:</p>
<ul>
<li><a href="https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md#commit-message-format">https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md#commit-message-format</a></li>
</ul>

<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/2873#pullrequestreview-775351904">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZLQTV47XJ5QIOEPDKLUF5CBVANCNFSM5FOO3QBA">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/ABO7UZJJWFQAJG2N2BBPRQTUF5CBVA5CNFSM5FOO3QBKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOFY3O4YA.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/2873#pullrequestreview-775351904",
"url": "https://github.com/kamailio/kamailio/pull/2873#pullrequestreview-775351904",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>