python-crypto-2.6.1-63.fc45

List of Findings

Error: COMPILER_WARNING: [#def1]
pycrypto-2.6.1/src/MD2.c:45:19: warning[-Wunused-const-variable=]: ‘md2_oid’ defined but not used
#   45 | static const char md2_oid[] = { 0x06, 0x08, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x02, 0x02 };
#      |                   ^~~~~~~
#   43|    * 			}
#   44|    */
#   45|-> static const char md2_oid[] = { 0x06, 0x08, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x02, 0x02 };
#   46|   
#   47|   #define DER_OID 		((void*)&md2_oid)

Error: CPPCHECK_WARNING (CWE-457): [#def2]
pycrypto-2.6.1/src/MD2.c:143: warning[uninitvar]: Uninitialized variable: padding
#  141|   	padlen= 16-self->count;
#  142|   	for(i=0; i<padlen; i++) padding[i]=padlen;
#  143|-> 	hash_update(&temp, padding, padlen);
#  144|   	hash_update(&temp, temp.C, 16);
#  145|   	return PyBytes_FromStringAndSize((char *) temp.X, 16);

Error: COMPILER_WARNING (CWE-483): [#def3]
pycrypto-2.6.1/src/_counter.c: scope_hint: In function ‘PyInit__counter’
pycrypto-2.6.1/src/_counter.c:570:5: warning[-Wmisleading-indentation]: this ‘if’ clause does not guard...
#  570 |     if (m == NULL)
#      |     ^~
pycrypto-2.6.1/src/_counter.c:573:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
#  573 |         return m;
#      |         ^~~~~~
#  568|       /* Initialize the module */
#  569|       m = PyModule_Create(&moduledef);
#  570|->     if (m == NULL)
#  571|           return NULL;
#  572|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def4]
pycrypto-2.6.1/src/block_template.c:344:33: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘buffer + (sizetype)i’
pycrypto-2.6.1/src/block_template.c:498:1: enter_function: entry to ‘ALG_Decrypt’
pycrypto-2.6.1/src/block_template.c:507:12: branch_true: following ‘true’ branch...
pycrypto-2.6.1/src/block_template.c:508:24: branch_true: ...to here
pycrypto-2.6.1/src/block_template.c:508:24: call_function: calling ‘ALG_Encrypt’ from ‘ALG_Decrypt’
#  342|   				memmove(self->IV, self->IV + sz, 
#  343|   					BLOCK_SIZE-sz);
#  344|-> 				memcpy(self->IV + BLOCK_SIZE - sz, buffer + i,
#  345|   				       sz);
#  346|   			}

Error: COMPILER_WARNING (CWE-569): [#def5]
pycrypto-2.6.1/src/SHA256.c:72: included_from: Included from here.
pycrypto-2.6.1/src/hash_SHA2_template.c: scope_hint: In function ‘add_length’
pycrypto-2.6.1/src/hash_SHA2_template.c:97:30: warning[-Wtautological-compare]: self-comparison always evaluates to false
#   97 |         if (hs->length_upper > hs->length_upper)
#      |                              ^
#   95|           overflow_detector = hs->length_upper;
#   96|           hs->length_upper++;
#   97|->         if (hs->length_upper > hs->length_upper)
#   98|               return 0;
#   99|       }

Error: COMPILER_WARNING: [#def6]
pycrypto-2.6.1/src/strxor.c:31:19: warning[-Wunused-const-variable=]: ‘rcsid’ defined but not used
#   31 | static const char rcsid[] = "$Id$";
#      |                   ^~~~~
#   29|   #include "pycrypto_compat.h"
#   30|   
#   31|-> static const char rcsid[] = "$Id$";
#   32|   
#   33|   /*

Scan Properties

analyzer-version-clippy1.97.1
analyzer-version-cppcheck2.21.1
analyzer-version-gcc16.1.1
analyzer-version-gcc-analyzer16.1.1
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-19.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namepython-crypto-2.6.1-63.fc45
store-results-to/tmp/tmpnn7d9wos/python-crypto-2.6.1-63.fc45.tar.xz
time-created2026-08-03 19:50:51
time-finished2026-08-03 19:52:10
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,clippy,unicontrol,shellcheck,cppcheck' '-o' '/tmp/tmpnn7d9wos/python-crypto-2.6.1-63.fc45.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpnn7d9wos/python-crypto-2.6.1-63.fc45.src.rpm'
tool-versioncsmock-3.8.7.20260803.142340.gb75b18e-1.el9