<h4 dir="auto">Pre-Submission Checklist</h4>



<ul dir="auto">
<li>[*] Commit message has the format required by CONTRIBUTING guide</li>
<li>[*] Commits are split per component (core, individual modules, libs, utils, ...)</li>
<li>[*] Each component has a single commit (if not, squash them into one commit)</li>
<li>[*] No commits to README files for modules (changes must be done to docbook files<br>
in <code class="notranslate">doc/</code> subfolder, the README file is autogenerated)</li>
</ul>
<h4 dir="auto">Type Of Change</h4>
<ul class="contains-task-list">
<li>[*] Small bug fix (non-breaking change which fixes an issue)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> New feature (non-breaking change which adds new functionality)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Breaking change (fix or feature that would change existing functionality)</li>
</ul>
<h4 dir="auto">Checklist:</h4>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> PR should be backported to stable branches</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Tested changes locally</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Related to issue #XXXX (replace XXXX with an open issue number)</li>
</ul>
<h4 dir="auto">Description</h4>
<p dir="auto">Fix for the following compiler warnings:</p>
<div class="snippet-clipboard-content position-relative overflow-auto" data-snippet-clipboard-copy-content="core/crypto/sha256.c:548:32: warning: argument 1 of type ‘sha2_byte[]’ {aka ‘unsigned char[]’} with mismatched bound [-Warray-parameter=]
  548 | void sr_SHA256_Final(sha2_byte digest[], SHA256_CTX* context) {
      |                      ~~~~~~~~~~^~~~~~~~
In file included from core/crypto/sha256.c:36:
core/crypto/sha256.h:86:22: note: previously declared as ‘uint8_t[32]’ {aka ‘unsigned char[32]’}
   86 | void sr_SHA256_Final(uint8_t[SHA256_DIGEST_LENGTH], SHA256_CTX*);
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
core/crypto/sha256.c:611:47: warning: argument 2 of type ‘char[]’ with mismatched bound [-Warray-parameter=]
  611 | char *sr_SHA256_End(SHA256_CTX* context, char buffer[]) {
      |                                          ~~~~~^~~~~~~~
In file included from core/crypto/sha256.c:36:
core/crypto/sha256.h:87:34: note: previously declared as ‘char[65]’
   87 | char* sr_SHA256_End(SHA256_CTX*, char[SHA256_DIGEST_STRING_LENGTH]);
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
core/crypto/sha256.c:911:32: warning: argument 1 of type ‘sha2_byte[]’ {aka ‘unsigned char[]’} with mismatched bound [-Warray-parameter=]
  911 | void sr_SHA512_Final(sha2_byte digest[], SHA512_CTX* context) {
      |                      ~~~~~~~~~~^~~~~~~~
In file included from core/crypto/sha256.c:36:
core/crypto/sha256.h:98:22: note: previously declared as ‘uint8_t[64]’ {aka ‘unsigned char[64]’}
   98 | void sr_SHA512_Final(uint8_t[SHA512_DIGEST_LENGTH], SHA512_CTX*);
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
core/crypto/sha256.c:940:47: warning: argument 2 of type ‘char[]’ with mismatched bound [-Warray-parameter=]
  940 | char *sr_SHA512_End(SHA512_CTX* context, char buffer[]) {
      |                                          ~~~~~^~~~~~~~
In file included from core/crypto/sha256.c:36:
core/crypto/sha256.h:99:34: note: previously declared as ‘char[129]’
   99 | char* sr_SHA512_End(SHA512_CTX*, char[SHA512_DIGEST_STRING_LENGTH]);
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
core/crypto/sha256.c:986:32: warning: argument 1 of type ‘sha2_byte[]’ {aka ‘unsigned char[]’} with mismatched bound [-Warray-parameter=]
  986 | void sr_SHA384_Final(sha2_byte digest[], SHA384_CTX* context) {
      |                      ~~~~~~~~~~^~~~~~~~
In file included from core/crypto/sha256.c:36:
core/crypto/sha256.h:92:22: note: previously declared as ‘uint8_t[48]’ {aka ‘unsigned char[48]’}
   92 | void sr_SHA384_Final(uint8_t[SHA384_DIGEST_LENGTH], SHA384_CTX*);
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
core/crypto/sha256.c:1015:47: warning: argument 2 of type ‘char[]’ with mismatched bound [-Warray-parameter=]
 1015 | char *sr_SHA384_End(SHA384_CTX* context, char buffer[]) {
      |                                          ~~~~~^~~~~~~~
In file included from core/crypto/sha256.c:36:
core/crypto/sha256.h:93:34: note: previously declared as ‘char[97]’
   93 | char* sr_SHA384_End(SHA384_CTX*, char[SHA384_DIGEST_STRING_LENGTH]);
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"><pre class="notranslate"><code class="notranslate">core/crypto/sha256.c:548:32: warning: argument 1 of type ‘sha2_byte[]’ {aka ‘unsigned char[]’} with mismatched bound [-Warray-parameter=]
  548 | void sr_SHA256_Final(sha2_byte digest[], SHA256_CTX* context) {
      |                      ~~~~~~~~~~^~~~~~~~
In file included from core/crypto/sha256.c:36:
core/crypto/sha256.h:86:22: note: previously declared as ‘uint8_t[32]’ {aka ‘unsigned char[32]’}
   86 | void sr_SHA256_Final(uint8_t[SHA256_DIGEST_LENGTH], SHA256_CTX*);
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
core/crypto/sha256.c:611:47: warning: argument 2 of type ‘char[]’ with mismatched bound [-Warray-parameter=]
  611 | char *sr_SHA256_End(SHA256_CTX* context, char buffer[]) {
      |                                          ~~~~~^~~~~~~~
In file included from core/crypto/sha256.c:36:
core/crypto/sha256.h:87:34: note: previously declared as ‘char[65]’
   87 | char* sr_SHA256_End(SHA256_CTX*, char[SHA256_DIGEST_STRING_LENGTH]);
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
core/crypto/sha256.c:911:32: warning: argument 1 of type ‘sha2_byte[]’ {aka ‘unsigned char[]’} with mismatched bound [-Warray-parameter=]
  911 | void sr_SHA512_Final(sha2_byte digest[], SHA512_CTX* context) {
      |                      ~~~~~~~~~~^~~~~~~~
In file included from core/crypto/sha256.c:36:
core/crypto/sha256.h:98:22: note: previously declared as ‘uint8_t[64]’ {aka ‘unsigned char[64]’}
   98 | void sr_SHA512_Final(uint8_t[SHA512_DIGEST_LENGTH], SHA512_CTX*);
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
core/crypto/sha256.c:940:47: warning: argument 2 of type ‘char[]’ with mismatched bound [-Warray-parameter=]
  940 | char *sr_SHA512_End(SHA512_CTX* context, char buffer[]) {
      |                                          ~~~~~^~~~~~~~
In file included from core/crypto/sha256.c:36:
core/crypto/sha256.h:99:34: note: previously declared as ‘char[129]’
   99 | char* sr_SHA512_End(SHA512_CTX*, char[SHA512_DIGEST_STRING_LENGTH]);
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
core/crypto/sha256.c:986:32: warning: argument 1 of type ‘sha2_byte[]’ {aka ‘unsigned char[]’} with mismatched bound [-Warray-parameter=]
  986 | void sr_SHA384_Final(sha2_byte digest[], SHA384_CTX* context) {
      |                      ~~~~~~~~~~^~~~~~~~
In file included from core/crypto/sha256.c:36:
core/crypto/sha256.h:92:22: note: previously declared as ‘uint8_t[48]’ {aka ‘unsigned char[48]’}
   92 | void sr_SHA384_Final(uint8_t[SHA384_DIGEST_LENGTH], SHA384_CTX*);
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
core/crypto/sha256.c:1015:47: warning: argument 2 of type ‘char[]’ with mismatched bound [-Warray-parameter=]
 1015 | char *sr_SHA384_End(SHA384_CTX* context, char buffer[]) {
      |                                          ~~~~~^~~~~~~~
In file included from core/crypto/sha256.c:36:
core/crypto/sha256.h:93:34: note: previously declared as ‘char[97]’
   93 | char* sr_SHA384_End(SHA384_CTX*, char[SHA384_DIGEST_STRING_LENGTH]);
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</code></pre></div>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/kamailio/kamailio/pull/3098'>https://github.com/kamailio/kamailio/pull/3098</a></p>

<h4>Commit Summary</h4>
<ul>
  <li><a href="https://github.com/kamailio/kamailio/pull/3098/commits/0681ca7f34809e6092b8b725f60df0a0066324e3" class="commit-link">0681ca7</a>  core/crypto: fix several mismatched bound warnings</li>
</ul>

<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/kamailio/kamailio/pull/3098/files">2 files</a>)</p>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/3098/files#diff-be64d4fdda473ade1d9d55ff36978a5a99ce38b57a4647b9c32c5e1b2af5f0e5">src/core/crypto/sha256.c</a>
    (16)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/3098/files#diff-88f20f8781fe142e799df3bdc2d6d76cecada446ee6e6fba7a8c5a5b36bb8a74">src/core/crypto/sha256.h</a>
    (9)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/kamailio/kamailio/pull/3098.patch'>https://github.com/kamailio/kamailio/pull/3098.patch</a></li>
  <li><a href='https://github.com/kamailio/kamailio/pull/3098.diff'>https://github.com/kamailio/kamailio/pull/3098.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/pull/3098">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZPDA2T7LQC5QQO2H4DVHP27ZANCNFSM5UWKHYNA">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/ABO7UZJL2UGGCYDPJNQMZTTVHP27ZA5CNFSM5UWKHYNKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4SGHR2XQ.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><kamailio/kamailio/pull/3098</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/pull/3098",
"url": "https://github.com/kamailio/kamailio/pull/3098",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>