Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compiler warning #661

Merged
merged 1 commit into from
Aug 29, 2024
Merged

Fix compiler warning #661

merged 1 commit into from
Aug 29, 2024

Conversation

sjaeckel
Copy link
Member

Repeated from 97edea3

src/encauth/ccm/ccm_add_nonce.c: In function ‘ccm_add_nonce’:
src/encauth/ccm/ccm_add_nonce.c:61:21: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
   61 |       ccm->PAD[x++] = (unsigned char)((len >> 24) & 255);
      |       ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/headers/tomcrypt.h:82,
                 from ./src/headers/tomcrypt_private.h:4,
                 from src/encauth/ccm/ccm_add_nonce.c:3:
./src/headers/tomcrypt_mac.h:410:24: note: at offset 16 into destination object ‘PAD’ of size 16
  410 |    unsigned char       PAD[16],              /* flags | Nonce N | l(m) */

Repeated from 97edea3

```
src/encauth/ccm/ccm_add_nonce.c: In function ‘ccm_add_nonce’:
src/encauth/ccm/ccm_add_nonce.c:61:21: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
   61 |       ccm->PAD[x++] = (unsigned char)((len >> 24) & 255);
      |       ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./src/headers/tomcrypt.h:82,
                 from ./src/headers/tomcrypt_private.h:4,
                 from src/encauth/ccm/ccm_add_nonce.c:3:
./src/headers/tomcrypt_mac.h:410:24: note: at offset 16 into destination object ‘PAD’ of size 16
  410 |    unsigned char       PAD[16],              /* flags | Nonce N | l(m) */
```

Signed-off-by: Steffen Jaeckel <[email protected]>
@sjaeckel sjaeckel merged commit 12bf723 into develop Aug 29, 2024
75 checks passed
@sjaeckel sjaeckel deleted the fix-ccm branch August 29, 2024 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants