Task #91804 - python-crypto-2.6.1-59.fc44/scan-results.err
back to task #91804download
Error: GCC_ANALYZER_WARNING (CWE-401):
pycrypto-2.6.1/src/DES.c:83:10: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
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_false: following ‘false’ branch...
pycrypto-2.6.1/src/block_template.c:510:14: branch_false: ...to here
pycrypto-2.6.1/src/block_template.c:510:12: branch_false: following ‘false’ branch...
pycrypto-2.6.1/src/block_template.c:512:13: branch_false: ...to here
pycrypto-2.6.1/src/block_template.c:512:12: branch_false: following ‘false’ branch...
pycrypto-2.6.1/src/block_template.c:512:12: branch_false: ...to here
pycrypto-2.6.1/src/block_template.c:532:16: acquire_memory: allocated here
pycrypto-2.6.1/src/block_template.c:533:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
pycrypto-2.6.1/src/block_template.c:540:9: branch_false: ...to here
pycrypto-2.6.1/src/block_template.c:564:26: branch_true: following ‘true’ branch...
pycrypto-2.6.1/src/block_template.c:566:52: branch_true: ...to here
pycrypto-2.6.1/src/block_template.c:566:25: call_function: calling ‘block_encrypt’ from ‘ALG_Decrypt’
# 81| int rc;
# 82| #ifdef PCT_DES3_MODULE
# 83|-> rc = des3_ecb_encrypt(in, out, &self->sk);
# 84| #else
# 85| rc = des_ecb_encrypt(in, out, &self->sk);
Error: GCC_ANALYZER_WARNING (CWE-401):
pycrypto-2.6.1/src/DES.c:85:10: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
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_false: following ‘false’ branch...
pycrypto-2.6.1/src/block_template.c:510:14: branch_false: ...to here
pycrypto-2.6.1/src/block_template.c:510:12: branch_false: following ‘false’ branch...
pycrypto-2.6.1/src/block_template.c:512:13: branch_false: ...to here
pycrypto-2.6.1/src/block_template.c:512:12: branch_false: following ‘false’ branch...
pycrypto-2.6.1/src/block_template.c:512:12: branch_false: ...to here
pycrypto-2.6.1/src/block_template.c:532:16: acquire_memory: allocated here
pycrypto-2.6.1/src/block_template.c:533:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
pycrypto-2.6.1/src/block_template.c:540:9: branch_false: ...to here
pycrypto-2.6.1/src/block_template.c:564:26: branch_true: following ‘true’ branch...
pycrypto-2.6.1/src/block_template.c:566:52: branch_true: ...to here
pycrypto-2.6.1/src/block_template.c:566:25: call_function: calling ‘block_encrypt’ from ‘ALG_Decrypt’
# 83| rc = des3_ecb_encrypt(in, out, &self->sk);
# 84| #else
# 85|-> rc = des_ecb_encrypt(in, out, &self->sk);
# 86| #endif
# 87| assert(rc == CRYPT_OK);
Error: GCC_ANALYZER_WARNING (CWE-401):
pycrypto-2.6.1/src/DES.c:94:10: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
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_false: following ‘false’ branch...
pycrypto-2.6.1/src/block_template.c:510:14: branch_false: ...to here
pycrypto-2.6.1/src/block_template.c:510:12: branch_false: following ‘false’ branch...
pycrypto-2.6.1/src/block_template.c:512:13: branch_false: ...to here
pycrypto-2.6.1/src/block_template.c:512:12: branch_false: following ‘false’ branch...
pycrypto-2.6.1/src/block_template.c:512:12: branch_false: ...to here
pycrypto-2.6.1/src/block_template.c:532:16: acquire_memory: allocated here
pycrypto-2.6.1/src/block_template.c:533:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
pycrypto-2.6.1/src/block_template.c:540:9: branch_false: ...to here
pycrypto-2.6.1/src/block_template.c:544:26: branch_true: following ‘true’ branch...
pycrypto-2.6.1/src/block_template.c:546:25: branch_true: ...to here
pycrypto-2.6.1/src/block_template.c:546:25: call_function: calling ‘block_decrypt’ from ‘ALG_Decrypt’
# 92| int rc;
# 93| #ifdef PCT_DES3_MODULE
# 94|-> rc = des3_ecb_decrypt(in, out, &self->sk);
# 95| #else
# 96| rc = des_ecb_decrypt(in, out, &self->sk);
Error: GCC_ANALYZER_WARNING (CWE-401):
pycrypto-2.6.1/src/DES.c:96:10: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
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_false: following ‘false’ branch...
pycrypto-2.6.1/src/block_template.c:510:14: branch_false: ...to here
pycrypto-2.6.1/src/block_template.c:510:12: branch_false: following ‘false’ branch...
pycrypto-2.6.1/src/block_template.c:512:13: branch_false: ...to here
pycrypto-2.6.1/src/block_template.c:512:12: branch_false: following ‘false’ branch...
pycrypto-2.6.1/src/block_template.c:512:12: branch_false: ...to here
pycrypto-2.6.1/src/block_template.c:532:16: acquire_memory: allocated here
pycrypto-2.6.1/src/block_template.c:533:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
pycrypto-2.6.1/src/block_template.c:540:9: branch_false: ...to here
pycrypto-2.6.1/src/block_template.c:544:26: branch_true: following ‘true’ branch...
pycrypto-2.6.1/src/block_template.c:546:25: branch_true: ...to here
pycrypto-2.6.1/src/block_template.c:546:25: call_function: calling ‘block_decrypt’ from ‘ALG_Decrypt’
# 94| rc = des3_ecb_decrypt(in, out, &self->sk);
# 95| #else
# 96|-> rc = des_ecb_decrypt(in, out, &self->sk);
# 97| #endif
# 98| assert(rc == CRYPT_OK);
Error: COMPILER_WARNING:
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):
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):
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-401):
pycrypto-2.6.1/src/block_template.c:306:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
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’
# 304| return NULL;
# 305| }
# 306|-> Py_BEGIN_ALLOW_THREADS;
# 307| switch(self->mode)
# 308| {
Error: GCC_ANALYZER_WARNING (CWE-457):
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: GCC_ANALYZER_WARNING (CWE-401):
pycrypto-2.6.1/src/block_template.c:411:41: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
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’
# 409| PCT_CounterObject *ctr = (PCT_CounterObject *)(self->counter);
# 410| if (ctr->carry && !ctr->allow_wraparound) {
# 411|-> Py_BLOCK_THREADS;
# 412| PyErr_SetString(PyExc_OverflowError,
# 413| "counter wrapped without allow_wraparound");
Error: GCC_ANALYZER_WARNING (CWE-401):
pycrypto-2.6.1/src/block_template.c:412:41: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
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’
# 410| if (ctr->carry && !ctr->allow_wraparound) {
# 411| Py_BLOCK_THREADS;
# 412|-> PyErr_SetString(PyExc_OverflowError,
# 413| "counter wrapped without allow_wraparound");
# 414| free(buffer);
Error: GCC_ANALYZER_WARNING (CWE-401):
pycrypto-2.6.1/src/block_template.c:418:41: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
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’
# 416| }
# 417| if (ctr->buf_size != BLOCK_SIZE) {
# 418|-> Py_BLOCK_THREADS;
# 419| PyErr_Format(PyExc_TypeError,
# 420| "CTR counter function returned "
Error: GCC_ANALYZER_WARNING (CWE-401):
pycrypto-2.6.1/src/block_template.c:419:41: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
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’
# 417| if (ctr->buf_size != BLOCK_SIZE) {
# 418| Py_BLOCK_THREADS;
# 419|-> PyErr_Format(PyExc_TypeError,
# 420| "CTR counter function returned "
# 421| "string not of length %i",
Error: GCC_ANALYZER_WARNING (CWE-401):
pycrypto-2.6.1/src/block_template.c:429:33: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
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’
# 427| (unsigned char *)ctr->val,
# 428| self->IV);
# 429|-> ctr->inc_func(ctr);
# 430| } else {
# 431| PyObject *ctr;
Error: GCC_ANALYZER_WARNING (CWE-401):
pycrypto-2.6.1/src/block_template.c:432:33: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
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’
# 430| } else {
# 431| PyObject *ctr;
# 432|-> Py_BLOCK_THREADS;
# 433| ctr = PyObject_CallObject(self->counter, NULL);
# 434| if (ctr == NULL) {
Error: GCC_ANALYZER_WARNING (CWE-401):
pycrypto-2.6.1/src/block_template.c:433:39: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
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’
# 431| PyObject *ctr;
# 432| Py_BLOCK_THREADS;
# 433|-> ctr = PyObject_CallObject(self->counter, NULL);
# 434| if (ctr == NULL) {
# 435| free(buffer);
Error: GCC_ANALYZER_WARNING (CWE-401):
pycrypto-2.6.1/src/block_template.c:440:41: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
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’
# 438| if (!PyBytes_Check(ctr))
# 439| {
# 440|-> PyErr_SetString(PyExc_TypeError,
# 441| #ifdef IS_PY3K
# 442| "CTR counter function didn't return bytes");
Error: GCC_ANALYZER_WARNING (CWE-401):
pycrypto-2.6.1/src/block_template.c:450:37: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
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’
# 448| return NULL;
# 449| }
# 450|-> if (PyBytes_Size(ctr) != BLOCK_SIZE) {
# 451| PyErr_Format(PyExc_TypeError,
# 452| "CTR counter function returned "
Error: GCC_ANALYZER_WARNING (CWE-401):
pycrypto-2.6.1/src/block_template.c:451:41: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
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’
# 449| }
# 450| if (PyBytes_Size(ctr) != BLOCK_SIZE) {
# 451|-> PyErr_Format(PyExc_TypeError,
# 452| "CTR counter function returned "
# 453| #ifdef IS_PY3K
Error: GCC_ANALYZER_WARNING (CWE-401):
pycrypto-2.6.1/src/block_template.c:463:33: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
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’
# 461| return NULL;
# 462| }
# 463|-> Py_UNBLOCK_THREADS;
# 464| block_encrypt(&(self->st), (unsigned char *)PyBytes_AsString(ctr),
# 465| self->IV);
Error: GCC_ANALYZER_WARNING (CWE-401):
pycrypto-2.6.1/src/block_template.c:464:77: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
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’
# 462| }
# 463| Py_UNBLOCK_THREADS;
# 464|-> block_encrypt(&(self->st), (unsigned char *)PyBytes_AsString(ctr),
# 465| self->IV);
# 466| Py_BLOCK_THREADS;
Error: GCC_ANALYZER_WARNING (CWE-401):
pycrypto-2.6.1/src/block_template.c:466:33: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
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’
# 464| block_encrypt(&(self->st), (unsigned char *)PyBytes_AsString(ctr),
# 465| self->IV);
# 466|-> Py_BLOCK_THREADS;
# 467| Py_DECREF(ctr);
# 468| Py_UNBLOCK_THREADS;
Error: GCC_ANALYZER_WARNING (CWE-401):
pycrypto-2.6.1/src/block_template.c:468:33: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
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’
# 466| Py_BLOCK_THREADS;
# 467| Py_DECREF(ctr);
# 468|-> Py_UNBLOCK_THREADS;
# 469| }
# 470|
Error: GCC_ANALYZER_WARNING (CWE-401):
pycrypto-2.6.1/src/block_template.c:477:17: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
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’
# 475|
# 476| default:
# 477|-> Py_BLOCK_THREADS;
# 478| PyErr_Format(PyExc_SystemError,
# 479| "Unknown ciphertext feedback mode %i; "
Error: GCC_ANALYZER_WARNING (CWE-401):
pycrypto-2.6.1/src/block_template.c:478:17: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
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’
# 476| default:
# 477| Py_BLOCK_THREADS;
# 478|-> PyErr_Format(PyExc_SystemError,
# 479| "Unknown ciphertext feedback mode %i; "
# 480| "this shouldn't happen",
Error: GCC_ANALYZER_WARNING (CWE-401):
pycrypto-2.6.1/src/block_template.c:485:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
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’
# 483| return NULL;
# 484| }
# 485|-> Py_END_ALLOW_THREADS;
# 486| result=PyBytes_FromStringAndSize((char *) buffer, len);
# 487| free(buffer);
Error: GCC_ANALYZER_WARNING (CWE-401):
pycrypto-2.6.1/src/block_template.c:486:16: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
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’
# 484| }
# 485| Py_END_ALLOW_THREADS;
# 486|-> result=PyBytes_FromStringAndSize((char *) buffer, len);
# 487| free(buffer);
# 488| return(result);
Error: GCC_ANALYZER_WARNING (CWE-401):
pycrypto-2.6.1/src/block_template.c:540:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
pycrypto-2.6.1/src/block_template.c:507:12: branch_false: following ‘false’ branch...
pycrypto-2.6.1/src/block_template.c:510:14: branch_false: ...to here
pycrypto-2.6.1/src/block_template.c:510:12: branch_false: following ‘false’ branch...
pycrypto-2.6.1/src/block_template.c:512:13: branch_false: ...to here
pycrypto-2.6.1/src/block_template.c:512:12: branch_false: following ‘false’ branch...
pycrypto-2.6.1/src/block_template.c:512:12: branch_false: ...to here
pycrypto-2.6.1/src/block_template.c:532:16: acquire_memory: allocated here
pycrypto-2.6.1/src/block_template.c:533:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
pycrypto-2.6.1/src/block_template.c:540:9: branch_false: ...to here
pycrypto-2.6.1/src/block_template.c:540:9: throw: if ‘PyEval_SaveThread’ throws an exception...
pycrypto-2.6.1/src/block_template.c:540:9: danger: ‘buffer’ leaks here; was allocated at [(7)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/6)
# 538| return NULL;
# 539| }
# 540|-> Py_BEGIN_ALLOW_THREADS;
# 541| switch(self->mode)
# 542| {
Error: GCC_ANALYZER_WARNING (CWE-401):
pycrypto-2.6.1/src/block_template.c:602:17: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
pycrypto-2.6.1/src/block_template.c:507:12: branch_false: following ‘false’ branch...
pycrypto-2.6.1/src/block_template.c:510:14: branch_false: ...to here
pycrypto-2.6.1/src/block_template.c:510:12: branch_false: following ‘false’ branch...
pycrypto-2.6.1/src/block_template.c:512:13: branch_false: ...to here
pycrypto-2.6.1/src/block_template.c:512:12: branch_false: following ‘false’ branch...
pycrypto-2.6.1/src/block_template.c:512:12: branch_false: ...to here
pycrypto-2.6.1/src/block_template.c:532:16: acquire_memory: allocated here
pycrypto-2.6.1/src/block_template.c:533:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
pycrypto-2.6.1/src/block_template.c:540:9: branch_false: ...to here
pycrypto-2.6.1/src/block_template.c:602:17: throw: if ‘PyEval_RestoreThread’ throws an exception...
pycrypto-2.6.1/src/block_template.c:602:17: danger: ‘buffer’ leaks here; was allocated at [(7)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/6)
# 600|
# 601| default:
# 602|-> Py_BLOCK_THREADS;
# 603| PyErr_Format(PyExc_SystemError,
# 604| "Unknown ciphertext feedback mode %i; "
Error: GCC_ANALYZER_WARNING (CWE-401):
pycrypto-2.6.1/src/block_template.c:603:17: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
pycrypto-2.6.1/src/block_template.c:507:12: branch_false: following ‘false’ branch...
pycrypto-2.6.1/src/block_template.c:510:14: branch_false: ...to here
pycrypto-2.6.1/src/block_template.c:510:12: branch_false: following ‘false’ branch...
pycrypto-2.6.1/src/block_template.c:512:13: branch_false: ...to here
pycrypto-2.6.1/src/block_template.c:512:12: branch_false: following ‘false’ branch...
pycrypto-2.6.1/src/block_template.c:512:12: branch_false: ...to here
pycrypto-2.6.1/src/block_template.c:532:16: acquire_memory: allocated here
pycrypto-2.6.1/src/block_template.c:533:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
pycrypto-2.6.1/src/block_template.c:540:9: branch_false: ...to here
pycrypto-2.6.1/src/block_template.c:603:17: throw: if ‘PyErr_Format’ throws an exception...
pycrypto-2.6.1/src/block_template.c:603:17: danger: ‘buffer’ leaks here; was allocated at [(7)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/6)
# 601| default:
# 602| Py_BLOCK_THREADS;
# 603|-> PyErr_Format(PyExc_SystemError,
# 604| "Unknown ciphertext feedback mode %i; "
# 605| "this shouldn't happen",
Error: GCC_ANALYZER_WARNING (CWE-401):
pycrypto-2.6.1/src/block_template.c:610:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
pycrypto-2.6.1/src/block_template.c:507:12: branch_false: following ‘false’ branch...
pycrypto-2.6.1/src/block_template.c:510:14: branch_false: ...to here
pycrypto-2.6.1/src/block_template.c:510:12: branch_false: following ‘false’ branch...
pycrypto-2.6.1/src/block_template.c:512:13: branch_false: ...to here
pycrypto-2.6.1/src/block_template.c:512:12: branch_false: following ‘false’ branch...
pycrypto-2.6.1/src/block_template.c:512:12: branch_false: ...to here
pycrypto-2.6.1/src/block_template.c:532:16: acquire_memory: allocated here
pycrypto-2.6.1/src/block_template.c:533:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
pycrypto-2.6.1/src/block_template.c:540:9: branch_false: ...to here
pycrypto-2.6.1/src/block_template.c:551:26: branch_false: following ‘false’ branch...
pycrypto-2.6.1/src/block_template.c:610:9: branch_false: ...to here
pycrypto-2.6.1/src/block_template.c:610:9: throw: if ‘PyEval_RestoreThread’ throws an exception...
pycrypto-2.6.1/src/block_template.c:610:9: danger: ‘buffer’ leaks here; was allocated at [(7)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/6)
# 608| return NULL;
# 609| }
# 610|-> Py_END_ALLOW_THREADS;
# 611| result=PyBytes_FromStringAndSize((char *) buffer, len);
# 612| free(buffer);
Error: GCC_ANALYZER_WARNING (CWE-401):
pycrypto-2.6.1/src/block_template.c:611:16: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
pycrypto-2.6.1/src/block_template.c:507:12: branch_false: following ‘false’ branch...
pycrypto-2.6.1/src/block_template.c:510:14: branch_false: ...to here
pycrypto-2.6.1/src/block_template.c:510:12: branch_false: following ‘false’ branch...
pycrypto-2.6.1/src/block_template.c:512:13: branch_false: ...to here
pycrypto-2.6.1/src/block_template.c:512:12: branch_false: following ‘false’ branch...
pycrypto-2.6.1/src/block_template.c:512:12: branch_false: ...to here
pycrypto-2.6.1/src/block_template.c:532:16: acquire_memory: allocated here
pycrypto-2.6.1/src/block_template.c:533:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
pycrypto-2.6.1/src/block_template.c:540:9: branch_false: ...to here
pycrypto-2.6.1/src/block_template.c:551:26: branch_false: following ‘false’ branch...
pycrypto-2.6.1/src/block_template.c:610:9: branch_false: ...to here
pycrypto-2.6.1/src/block_template.c:611:16: throw: if ‘PyBytes_FromStringAndSize’ throws an exception...
pycrypto-2.6.1/src/block_template.c:611:16: danger: ‘buffer’ leaks here; was allocated at [(7)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/6)
# 609| }
# 610| Py_END_ALLOW_THREADS;
# 611|-> result=PyBytes_FromStringAndSize((char *) buffer, len);
# 612| free(buffer);
# 613| return(result);
Error: COMPILER_WARNING (CWE-569):
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: GCC_ANALYZER_WARNING (CWE-401):
pycrypto-2.6.1/src/stream_template.c:160:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
pycrypto-2.6.1/src/stream_template.c:147:12: branch_false: following ‘false’ branch...
pycrypto-2.6.1/src/stream_template.c:149:13: branch_false: ...to here
pycrypto-2.6.1/src/stream_template.c:149:12: branch_false: following ‘false’ branch...
pycrypto-2.6.1/src/stream_template.c:153:18: branch_false: ...to here
pycrypto-2.6.1/src/stream_template.c:153:18: acquire_memory: allocated here
pycrypto-2.6.1/src/stream_template.c:154:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
pycrypto-2.6.1/src/stream_template.c:160:9: branch_false: ...to here
pycrypto-2.6.1/src/stream_template.c:160:9: throw: if ‘PyEval_SaveThread’ throws an exception...
pycrypto-2.6.1/src/stream_template.c:160:9: danger: ‘buffer’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
# 158| return NULL;
# 159| }
# 160|-> Py_BEGIN_ALLOW_THREADS;
# 161| memcpy(buffer, str, (size_t)len);
# 162| stream_encrypt(&(self->st), buffer, (int)len);
Error: GCC_ANALYZER_WARNING (CWE-401):
pycrypto-2.6.1/src/stream_template.c:163:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
pycrypto-2.6.1/src/stream_template.c:141:1: enter_function: entry to ‘ALG_Encrypt’
pycrypto-2.6.1/src/stream_template.c:147:12: branch_false: following ‘false’ branch...
pycrypto-2.6.1/src/stream_template.c:149:13: branch_false: ...to here
pycrypto-2.6.1/src/stream_template.c:149:12: branch_false: following ‘false’ branch...
pycrypto-2.6.1/src/stream_template.c:153:18: branch_false: ...to here
pycrypto-2.6.1/src/stream_template.c:153:18: acquire_memory: allocated here
pycrypto-2.6.1/src/stream_template.c:154:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
pycrypto-2.6.1/src/stream_template.c:160:9: branch_false: ...to here
pycrypto-2.6.1/src/stream_template.c:162:9: call_function: calling ‘stream_encrypt’ from ‘ALG_Encrypt’
pycrypto-2.6.1/src/stream_template.c:162:9: return_function: returning to ‘ALG_Encrypt’ from ‘stream_encrypt’
pycrypto-2.6.1/src/stream_template.c:163:9: throw: if ‘PyEval_RestoreThread’ throws an exception...
pycrypto-2.6.1/src/stream_template.c:163:9: danger: ‘buffer’ leaks here; was allocated at [(6)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/5)
# 161| memcpy(buffer, str, (size_t)len);
# 162| stream_encrypt(&(self->st), buffer, (int)len);
# 163|-> Py_END_ALLOW_THREADS;
# 164| result = PyBytes_FromStringAndSize((char *)buffer, len);
# 165| free(buffer);
Error: GCC_ANALYZER_WARNING (CWE-401):
pycrypto-2.6.1/src/stream_template.c:164:18: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
pycrypto-2.6.1/src/stream_template.c:141:1: enter_function: entry to ‘ALG_Encrypt’
pycrypto-2.6.1/src/stream_template.c:147:12: branch_false: following ‘false’ branch...
pycrypto-2.6.1/src/stream_template.c:149:13: branch_false: ...to here
pycrypto-2.6.1/src/stream_template.c:149:12: branch_false: following ‘false’ branch...
pycrypto-2.6.1/src/stream_template.c:153:18: branch_false: ...to here
pycrypto-2.6.1/src/stream_template.c:153:18: acquire_memory: allocated here
pycrypto-2.6.1/src/stream_template.c:154:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
pycrypto-2.6.1/src/stream_template.c:160:9: branch_false: ...to here
pycrypto-2.6.1/src/stream_template.c:162:9: call_function: calling ‘stream_encrypt’ from ‘ALG_Encrypt’
pycrypto-2.6.1/src/stream_template.c:162:9: return_function: returning to ‘ALG_Encrypt’ from ‘stream_encrypt’
pycrypto-2.6.1/src/stream_template.c:164:18: throw: if ‘PyBytes_FromStringAndSize’ throws an exception...
pycrypto-2.6.1/src/stream_template.c:164:18: danger: ‘buffer’ leaks here; was allocated at [(6)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/5)
# 162| stream_encrypt(&(self->st), buffer, (int)len);
# 163| Py_END_ALLOW_THREADS;
# 164|-> result = PyBytes_FromStringAndSize((char *)buffer, len);
# 165| free(buffer);
# 166| return (result);
Error: GCC_ANALYZER_WARNING (CWE-401):
pycrypto-2.6.1/src/stream_template.c:192:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
pycrypto-2.6.1/src/stream_template.c:179:12: branch_false: following ‘false’ branch...
pycrypto-2.6.1/src/stream_template.c:181:13: branch_false: ...to here
pycrypto-2.6.1/src/stream_template.c:181:12: branch_false: following ‘false’ branch...
pycrypto-2.6.1/src/stream_template.c:185:18: branch_false: ...to here
pycrypto-2.6.1/src/stream_template.c:185:18: acquire_memory: allocated here
pycrypto-2.6.1/src/stream_template.c:186:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
pycrypto-2.6.1/src/stream_template.c:192:9: branch_false: ...to here
pycrypto-2.6.1/src/stream_template.c:192:9: throw: if ‘PyEval_SaveThread’ throws an exception...
pycrypto-2.6.1/src/stream_template.c:192:9: danger: ‘buffer’ leaks here; was allocated at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
# 190| return NULL;
# 191| }
# 192|-> Py_BEGIN_ALLOW_THREADS;
# 193| memcpy(buffer, str, (size_t)len);
# 194| stream_decrypt(&(self->st), buffer, (int)len);
Error: GCC_ANALYZER_WARNING (CWE-401):
pycrypto-2.6.1/src/stream_template.c:195:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
pycrypto-2.6.1/src/stream_template.c:173:1: enter_function: entry to ‘ALG_Decrypt’
pycrypto-2.6.1/src/stream_template.c:179:12: branch_false: following ‘false’ branch...
pycrypto-2.6.1/src/stream_template.c:181:13: branch_false: ...to here
pycrypto-2.6.1/src/stream_template.c:181:12: branch_false: following ‘false’ branch...
pycrypto-2.6.1/src/stream_template.c:185:18: branch_false: ...to here
pycrypto-2.6.1/src/stream_template.c:185:18: acquire_memory: allocated here
pycrypto-2.6.1/src/stream_template.c:186:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
pycrypto-2.6.1/src/stream_template.c:192:9: branch_false: ...to here
pycrypto-2.6.1/src/stream_template.c:194:9: call_function: calling ‘stream_encrypt’ from ‘ALG_Decrypt’
pycrypto-2.6.1/src/stream_template.c:194:9: return_function: returning to ‘ALG_Decrypt’ from ‘stream_encrypt’
pycrypto-2.6.1/src/stream_template.c:195:9: throw: if ‘PyEval_RestoreThread’ throws an exception...
pycrypto-2.6.1/src/stream_template.c:195:9: danger: ‘buffer’ leaks here; was allocated at [(6)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/5)
# 193| memcpy(buffer, str, (size_t)len);
# 194| stream_decrypt(&(self->st), buffer, (int)len);
# 195|-> Py_END_ALLOW_THREADS;
# 196| result = PyBytes_FromStringAndSize((char *)buffer, len);
# 197| free(buffer);
Error: GCC_ANALYZER_WARNING (CWE-401):
pycrypto-2.6.1/src/stream_template.c:196:18: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
pycrypto-2.6.1/src/stream_template.c:173:1: enter_function: entry to ‘ALG_Decrypt’
pycrypto-2.6.1/src/stream_template.c:179:12: branch_false: following ‘false’ branch...
pycrypto-2.6.1/src/stream_template.c:181:13: branch_false: ...to here
pycrypto-2.6.1/src/stream_template.c:181:12: branch_false: following ‘false’ branch...
pycrypto-2.6.1/src/stream_template.c:185:18: branch_false: ...to here
pycrypto-2.6.1/src/stream_template.c:185:18: acquire_memory: allocated here
pycrypto-2.6.1/src/stream_template.c:186:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
pycrypto-2.6.1/src/stream_template.c:192:9: branch_false: ...to here
pycrypto-2.6.1/src/stream_template.c:194:9: call_function: calling ‘stream_encrypt’ from ‘ALG_Decrypt’
pycrypto-2.6.1/src/stream_template.c:194:9: return_function: returning to ‘ALG_Decrypt’ from ‘stream_encrypt’
pycrypto-2.6.1/src/stream_template.c:196:18: throw: if ‘PyBytes_FromStringAndSize’ throws an exception...
pycrypto-2.6.1/src/stream_template.c:196:18: danger: ‘buffer’ leaks here; was allocated at [(6)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/5)
# 194| stream_decrypt(&(self->st), buffer, (int)len);
# 195| Py_END_ALLOW_THREADS;
# 196|-> result = PyBytes_FromStringAndSize((char *)buffer, len);
# 197| free(buffer);
# 198| return (result);
Error: COMPILER_WARNING:
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| /*