Error: COMPILER_WARNING: [#def1] libtomcrypt-1.18.2/src/encauth/ccm/ccm_add_nonce.c:64:7: warning[-Wstringop-overflow=]: writing 1 byte into a region of size 0 # 62| } # 63| for (; y < ccm->L; y++) { # 64|-> ccm->PAD[x++] = (unsigned char)((len >> 24) & 255); # 65| len <<= 8; # 66| } Error: COMPILER_WARNING: [#def2] libtomcrypt-1.18.2/src/encauth/ccm/ccm_add_nonce.c: scope_hint: In function 'ccm_add_nonce' libtomcrypt-1.18.2/src/encauth/ccm/ccm_add_nonce.c:64:21: warning[-Wstringop-overflow=]: writing 1 byte into a region of size 0 # 64 | ccm->PAD[x++] = (unsigned char)((len >> 24) & 255); # | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ libtomcrypt-1.18.2/src/headers/tomcrypt.h:88: included_from: Included from here. libtomcrypt-1.18.2/src/encauth/ccm/ccm_add_nonce.c:9: included_from: Included from here. libtomcrypt-1.18.2/src/headers/tomcrypt_mac.h:327:24: note: at offset 16 into destination object 'PAD' of size 16 # 327 | unsigned char PAD[16], # | ^~~ # 62| } # 63| for (; y < ccm->L; y++) { # 64|-> ccm->PAD[x++] = (unsigned char)((len >> 24) & 255); # 65| len <<= 8; # 66| } Error: COMPILER_WARNING: [#def3] libtomcrypt-1.18.2/src/encauth/ccm/ccm_memory.c:49:19: note[note]: at offset 16 into destination object 'PAD' of size 16 # 47| int direction) # 48| { # 49|-> unsigned char PAD[16], ctr[16], CTRPAD[16], ptTag[16], b, *pt_real; # 50| unsigned char *pt_work = NULL; # 51| symmetric_key *skey; Error: COMPILER_WARNING: [#def4] libtomcrypt-1.18.2/src/encauth/ccm/ccm_memory.c:177:8: warning[-Wstringop-overflow=]: writing 1 byte into a region of size 0 # 175| } # 176| for (; y < L; y++) { # 177|-> PAD[x++] = (unsigned char)((len >> 24) & 255); # 178| len <<= 8; # 179| } Error: COMPILER_WARNING: [#def5] libtomcrypt-1.18.2/src/encauth/ccm/ccm_memory.c: scope_hint: In function 'ccm_memory' libtomcrypt-1.18.2/src/encauth/ccm/ccm_memory.c:177:17: warning[-Wstringop-overflow=]: writing 1 byte into a region of size 0 # 177 | PAD[x++] = (unsigned char)((len >> 24) & 255); # | ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ libtomcrypt-1.18.2/src/encauth/ccm/ccm_memory.c:49:19: note: at offset 16 into destination object 'PAD' of size 16 # 49 | unsigned char PAD[16], ctr[16], CTRPAD[16], ptTag[16], b, *pt_real; # | ^~~ # 175| } # 176| for (; y < L; y++) { # 177|-> PAD[x++] = (unsigned char)((len >> 24) & 255); # 178| len <<= 8; # 179| } Error: COMPILER_WARNING: [#def6] libtomcrypt-1.18.2/src/headers/tomcrypt_mac.h:327:24: note[note]: at offset 16 into destination object 'PAD' of size 16 # 325| noncelen; /* length of the nonce */ # 326| # 327|-> unsigned char PAD[16], # 328| ctr[16], # 329| CTRPAD[16], Error: COMPILER_WARNING: [#def7] libtomcrypt-1.18.2/src/headers/tomcrypt_mac.h:327:24: note[note]: at offset [17, 46] into destination object 'PAD' of size 16 # 325| noncelen; /* length of the nonce */ # 326| # 327|-> unsigned char PAD[16], # 328| ctr[16], # 329| CTRPAD[16], Error: COMPILER_WARNING (CWE-477): [#def8] libtomcrypt-1.18.2/src/math/ltm_desc.c: scope_hint: In function 'set_int' libtomcrypt-1.18.2/src/math/ltm_desc.c:92:4: warning[-Wdeprecated-declarations]: 'mp_set_int' is deprecated: replaced by mp_set_ul # 92 | return mpi_to_ltc_error(mp_set_int(a, b)); # | ^~~~~~ libtomcrypt-1.18.2/src/math/ltm_desc.c:15: included_from: Included from here. /usr/include/tommath.h:358:33: note: declared here # 358 | MP_DEPRECATED(mp_set_ul) mp_err mp_set_int(mp_int *a, unsigned long b); # | ^~~~~~~~~~ # 90| { # 91| LTC_ARGCHK(a != NULL); # 92|-> return mpi_to_ltc_error(mp_set_int(a, b)); # 93| } # 94| Error: COMPILER_WARNING (CWE-477): [#def9] libtomcrypt-1.18.2/src/math/ltm_desc.c:92:4: warning[-Wdeprecated-declarations]: 'mp_set_int' is deprecated: replaced by mp_set_ul # 90| { # 91| LTC_ARGCHK(a != NULL); # 92|-> return mpi_to_ltc_error(mp_set_int(a, b)); # 93| } # 94| Error: COMPILER_WARNING (CWE-477): [#def10] libtomcrypt-1.18.2/src/math/ltm_desc.c: scope_hint: In function 'get_int' libtomcrypt-1.18.2/src/math/ltm_desc.c:98:4: warning[-Wdeprecated-declarations]: 'mp_get_int' is deprecated: replaced by mp_get_mag_u32/mp_get_u32 # 98 | return mp_get_int(a); # | ^~~~~~ /usr/include/tommath.h:355:56: note: declared here # 355 | MP_DEPRECATED(mp_get_mag_u32/mp_get_u32) unsigned long mp_get_int(const mp_int *a) MP_WUR; # | ^~~~~~~~~~ # 96| { # 97| LTC_ARGCHK(a != NULL); # 98|-> return mp_get_int(a); # 99| } # 100| Error: COMPILER_WARNING (CWE-477): [#def11] libtomcrypt-1.18.2/src/math/ltm_desc.c:98:4: warning[-Wdeprecated-declarations]: 'mp_get_int' is deprecated: replaced by mp_get_mag_u32/mp_get_u32 # 96| { # 97| LTC_ARGCHK(a != NULL); # 98|-> return mp_get_int(a); # 99| } # 100| Error: COMPILER_WARNING (CWE-477): [#def12] libtomcrypt-1.18.2/src/math/ltm_desc.c: scope_hint: In function 'write_radix' libtomcrypt-1.18.2/src/math/ltm_desc.c:178:4: warning[-Wdeprecated-declarations]: 'mp_toradix' is deprecated: replaced by mp_to_radix # 178 | return mpi_to_ltc_error(mp_toradix(a, b, radix)); # | ^~~~~~ /usr/include/tommath.h:753:35: note: declared here # 753 | MP_DEPRECATED(mp_to_radix) mp_err mp_toradix(const mp_int *a, char *str, int radix) MP_WUR; # | ^~~~~~~~~~ # 176| LTC_ARGCHK(a != NULL); # 177| LTC_ARGCHK(b != NULL); # 178|-> return mpi_to_ltc_error(mp_toradix(a, b, radix)); # 179| } # 180| Error: COMPILER_WARNING (CWE-477): [#def13] libtomcrypt-1.18.2/src/math/ltm_desc.c:178:4: warning[-Wdeprecated-declarations]: 'mp_toradix' is deprecated: replaced by mp_to_radix # 176| LTC_ARGCHK(a != NULL); # 177| LTC_ARGCHK(b != NULL); # 178|-> return mpi_to_ltc_error(mp_toradix(a, b, radix)); # 179| } # 180| Error: COMPILER_WARNING (CWE-477): [#def14] libtomcrypt-1.18.2/src/math/ltm_desc.c: scope_hint: In function 'unsigned_size' libtomcrypt-1.18.2/src/math/ltm_desc.c:185:4: warning[-Wdeprecated-declarations]: 'mp_unsigned_bin_size' is deprecated: replaced by mp_ubin_size # 185 | return mp_unsigned_bin_size(a); # | ^~~~~~ /usr/include/tommath.h:734:33: note: declared here # 734 | MP_DEPRECATED(mp_ubin_size) int mp_unsigned_bin_size(const mp_int *a) MP_WUR; # | ^~~~~~~~~~~~~~~~~~~~ # 183| { # 184| LTC_ARGCHK(a != NULL); # 185|-> return mp_unsigned_bin_size(a); # 186| } # 187| Error: COMPILER_WARNING (CWE-477): [#def15] libtomcrypt-1.18.2/src/math/ltm_desc.c:185:4: warning[-Wdeprecated-declarations]: 'mp_unsigned_bin_size' is deprecated: replaced by mp_ubin_size # 183| { # 184| LTC_ARGCHK(a != NULL); # 185|-> return mp_unsigned_bin_size(a); # 186| } # 187| Error: COMPILER_WARNING (CWE-477): [#def16] libtomcrypt-1.18.2/src/math/ltm_desc.c: scope_hint: In function 'unsigned_write' libtomcrypt-1.18.2/src/math/ltm_desc.c:193:4: warning[-Wdeprecated-declarations]: 'mp_to_unsigned_bin' is deprecated: replaced by mp_to_ubin # 193 | return mpi_to_ltc_error(mp_to_unsigned_bin(a, b)); # | ^~~~~~ /usr/include/tommath.h:736:34: note: declared here # 736 | MP_DEPRECATED(mp_to_ubin) mp_err mp_to_unsigned_bin(const mp_int *a, unsigned char *b) MP_WUR; # | ^~~~~~~~~~~~~~~~~~ # 191| LTC_ARGCHK(a != NULL); # 192| LTC_ARGCHK(b != NULL); # 193|-> return mpi_to_ltc_error(mp_to_unsigned_bin(a, b)); # 194| } # 195| Error: COMPILER_WARNING (CWE-477): [#def17] libtomcrypt-1.18.2/src/math/ltm_desc.c:193:4: warning[-Wdeprecated-declarations]: 'mp_to_unsigned_bin' is deprecated: replaced by mp_to_ubin # 191| LTC_ARGCHK(a != NULL); # 192| LTC_ARGCHK(b != NULL); # 193|-> return mpi_to_ltc_error(mp_to_unsigned_bin(a, b)); # 194| } # 195| Error: COMPILER_WARNING (CWE-477): [#def18] libtomcrypt-1.18.2/src/math/ltm_desc.c: scope_hint: In function 'unsigned_read' libtomcrypt-1.18.2/src/math/ltm_desc.c:201:4: warning[-Wdeprecated-declarations]: 'mp_read_unsigned_bin' is deprecated: replaced by mp_from_ubin # 201 | return mpi_to_ltc_error(mp_read_unsigned_bin(a, b, len)); # | ^~~~~~ /usr/include/tommath.h:735:36: note: declared here # 735 | MP_DEPRECATED(mp_from_ubin) mp_err mp_read_unsigned_bin(mp_int *a, const unsigned char *b, int c) MP_WUR; # | ^~~~~~~~~~~~~~~~~~~~ # 199| LTC_ARGCHK(a != NULL); # 200| LTC_ARGCHK(b != NULL); # 201|-> return mpi_to_ltc_error(mp_read_unsigned_bin(a, b, len)); # 202| } # 203| Error: COMPILER_WARNING (CWE-477): [#def19] libtomcrypt-1.18.2/src/math/ltm_desc.c:201:4: warning[-Wdeprecated-declarations]: 'mp_read_unsigned_bin' is deprecated: replaced by mp_from_ubin # 199| LTC_ARGCHK(a != NULL); # 200| LTC_ARGCHK(b != NULL); # 201|-> return mpi_to_ltc_error(mp_read_unsigned_bin(a, b, len)); # 202| } # 203| Error: COMPILER_WARNING: [#def20] libtomcrypt-1.18.2/src/math/ltm_desc.c: scope_hint: At top level libtomcrypt-1.18.2/src/math/ltm_desc.c:423:9: warning: DIGIT_BIT macro is deprecated, MP_DIGIT_BIT instead # 423 | (int)DIGIT_BIT, # | ^~~~~~~~~ # 421| # 422| "LibTomMath", # 423|-> (int)DIGIT_BIT, # 424| # 425| &init, Error: COMPILER_WARNING: [#def21] libtomcrypt-1.18.2/src/misc/pkcs5/pkcs_5_test.c: scope_hint: In function 'pkcs_5_test' libtomcrypt-1.18.2/src/misc/pkcs5/pkcs_5_test.c:160:9: warning[-Wunused-but-set-variable=]: variable 'tested' set but not used # 160 | int tested=0, failed=0; # | ^~~~~~ # 158| unsigned long dkLen; # 159| int i, err; # 160|-> int tested=0, failed=0; # 161| int hash = find_hash("sha1"); # 162| if (hash == -1) Error: CPPCHECK_WARNING (CWE-786): [#def22] libtomcrypt-1.18.2/src/modes/lrw/lrw_process.c:65: error[negativeIndex]: Array 'lrw->IV[16]' accessed at index -1, which is out of bounds. # 63| #else # 64| for (y = 0; y < 16; y++) { # 65|-> lrw->pad[y] ^= lrw->PC[x][lrw->IV[x]][y] ^ lrw->PC[x][(lrw->IV[x]-1)&255][y]; # 66| } # 67| #endif Error: CPPCHECK_WARNING (CWE-786): [#def23] libtomcrypt-1.18.2/src/modes/lrw/lrw_process.c:65: error[negativeIndex]: Array 'lrw->PC[16][256][16]' accessed at index lrw->PC[-1][*][*], which is out of bounds. # 63| #else # 64| for (y = 0; y < 16; y++) { # 65|-> lrw->pad[y] ^= lrw->PC[x][lrw->IV[x]][y] ^ lrw->PC[x][(lrw->IV[x]-1)&255][y]; # 66| } # 67| #endif Error: COMPILER_WARNING: [#def24] libtomcrypt-1.18.2/src/pk/asn1/der/sequence/der_decode_sequence_flexi.c: scope_hint: In function 'der_decode_sequence_flexi' libtomcrypt-1.18.2/src/pk/asn1/der/sequence/der_decode_sequence_flexi.c:253:43: warning[-Wcalloc-transposed-args]: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument # 253 | if ((l->data = XCALLOC(sizeof(wchar_t), l->size)) == NULL) { # | ^~~~~~~ libtomcrypt-1.18.2/src/pk/asn1/der/sequence/der_decode_sequence_flexi.c:253:43: note: earlier argument should specify number of elements, later size of each element # 251| l->size = len; # 252| # 253|-> if ((l->data = XCALLOC(sizeof(wchar_t), l->size)) == NULL) { # 254| err = CRYPT_MEM; # 255| goto error; Error: COMPILER_WARNING: [#def25] libtomcrypt-1.18.2/src/pk/asn1/der/sequence/der_decode_sequence_multi.c: scope_hint: In function 'der_decode_sequence_multi' libtomcrypt-1.18.2/src/pk/asn1/der/sequence/der_decode_sequence_multi.c:88:25: warning[-Wcalloc-transposed-args]: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument # 88 | list = XCALLOC(sizeof(*list), x); # | ^ libtomcrypt-1.18.2/src/pk/asn1/der/sequence/der_decode_sequence_multi.c:88:25: note: earlier argument should specify number of elements, later size of each element # 86| } # 87| # 88|-> list = XCALLOC(sizeof(*list), x); # 89| if (list == NULL) { # 90| return CRYPT_MEM; Error: COMPILER_WARNING: [#def26] libtomcrypt-1.18.2/src/pk/asn1/der/sequence/der_encode_sequence_multi.c: scope_hint: In function 'der_encode_sequence_multi' libtomcrypt-1.18.2/src/pk/asn1/der/sequence/der_encode_sequence_multi.c:89:25: warning[-Wcalloc-transposed-args]: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument # 89 | list = XCALLOC(sizeof(*list), x); # | ^ libtomcrypt-1.18.2/src/pk/asn1/der/sequence/der_encode_sequence_multi.c:89:25: note: earlier argument should specify number of elements, later size of each element # 87| } # 88| # 89|-> list = XCALLOC(sizeof(*list), x); # 90| if (list == NULL) { # 91| return CRYPT_MEM; Error: CPPCHECK_WARNING (CWE-476): [#def27] libtomcrypt-1.18.2/tests/no_prng.c:167: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: no_prng # 165| LTC_ARGCHK(no_prng != NULL); # 166| XMEMCPY(&no_prng->desc, &no_prng_desc, sizeof(no_prng_desc)); # 167|-> LTC_ARGCHK(snprintf(no_prng->name, sizeof(no_prng->name), "no_prng@%p", no_prng) < (int)sizeof(no_prng->name)); # 168| no_prng->desc.name = no_prng->name; # 169| return &no_prng->desc;
| analyzer-version-clippy | 1.97.1 |
| analyzer-version-cppcheck | 2.21.1 |
| analyzer-version-gcc | 16.1.1 |
| analyzer-version-gcc-analyzer | 16.1.1 |
| analyzer-version-shellcheck | 0.11.0 |
| analyzer-version-unicontrol | 0.0.2 |
| enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| exit-code | 0 |
| host | ip-172-16-1-7.us-west-2.compute.internal |
| known-false-positives | /usr/share/csmock/known-false-positives.js |
| known-false-positives-rpm | known-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch |
| mock-config | fedora-rawhide-x86_64 |
| project-name | libtomcrypt-1.18.2-23.fc44 |
| store-results-to | /tmp/tmpmcajfw2q/libtomcrypt-1.18.2-23.fc44.tar.xz |
| time-created | 2026-08-03 18:04:45 |
| time-finished | 2026-08-03 18:10:02 |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,clippy,unicontrol,shellcheck,cppcheck' '-o' '/tmp/tmpmcajfw2q/libtomcrypt-1.18.2-23.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpmcajfw2q/libtomcrypt-1.18.2-23.fc44.src.rpm' |
| tool-version | csmock-3.8.7.20260803.142340.gb75b18e-1.el9 |