Flawfinder version 2.0.10, (C) 2001-2019 David A. Wheeler. Number of rules (primarily dangerous function names) in C/C++ ruleset: 223 Examining data/theano-1.0.5+dfsg/theano/gof/c_code/lazylinker_c.c Examining data/theano-1.0.5+dfsg/theano/gof/c_code/theano_mod_helper.h Examining data/theano-1.0.5+dfsg/theano/gof/tests/c_code/test_cenum.h Examining data/theano-1.0.5+dfsg/theano/gof/tests/c_code/test_quadratic_function.c Examining data/theano-1.0.5+dfsg/theano/gpuarray/c_code/blockgemv.c Examining data/theano-1.0.5+dfsg/theano/gpuarray/c_code/blockger.c Examining data/theano-1.0.5+dfsg/theano/gpuarray/c_code/conv_desc.c Examining data/theano-1.0.5+dfsg/theano/gpuarray/c_code/corr3d_gemm.c Examining data/theano-1.0.5+dfsg/theano/gpuarray/c_code/corr_gemm.c Examining data/theano-1.0.5+dfsg/theano/gpuarray/c_code/ctc_wrapper.c Examining data/theano-1.0.5+dfsg/theano/gpuarray/c_code/cudnn_helper.h Examining data/theano-1.0.5+dfsg/theano/gpuarray/c_code/dimshuffle.c Examining data/theano-1.0.5+dfsg/theano/gpuarray/c_code/dnn_base.c Examining data/theano-1.0.5+dfsg/theano/gpuarray/c_code/dnn_batchnorm.c Examining data/theano-1.0.5+dfsg/theano/gpuarray/c_code/dnn_batchnorm_base.c Examining data/theano-1.0.5+dfsg/theano/gpuarray/c_code/dnn_batchnorm_grad.c Examining data/theano-1.0.5+dfsg/theano/gpuarray/c_code/dnn_batchnorm_inf.c Examining data/theano-1.0.5+dfsg/theano/gpuarray/c_code/dnn_conv_base.c Examining data/theano-1.0.5+dfsg/theano/gpuarray/c_code/dnn_dropout_desc.c Examining data/theano-1.0.5+dfsg/theano/gpuarray/c_code/dnn_dropout_fwd.c Examining data/theano-1.0.5+dfsg/theano/gpuarray/c_code/dnn_fwd.c Examining data/theano-1.0.5+dfsg/theano/gpuarray/c_code/dnn_gi.c Examining data/theano-1.0.5+dfsg/theano/gpuarray/c_code/dnn_gw.c Examining data/theano-1.0.5+dfsg/theano/gpuarray/c_code/dnn_pool.c Examining data/theano-1.0.5+dfsg/theano/gpuarray/c_code/dnn_pool_grad.c Examining data/theano-1.0.5+dfsg/theano/gpuarray/c_code/dnn_redux.c Examining data/theano-1.0.5+dfsg/theano/gpuarray/c_code/dnn_rnn_desc.c Examining data/theano-1.0.5+dfsg/theano/gpuarray/c_code/dnn_rnn_fwd.c Examining data/theano-1.0.5+dfsg/theano/gpuarray/c_code/dnn_rnn_gi.c Examining data/theano-1.0.5+dfsg/theano/gpuarray/c_code/dnn_rnn_gw.c Examining data/theano-1.0.5+dfsg/theano/gpuarray/c_code/dnn_rnn_paramsize.c Examining data/theano-1.0.5+dfsg/theano/gpuarray/c_code/dnn_softmax.c Examining data/theano-1.0.5+dfsg/theano/gpuarray/c_code/dnn_softmax_grad.c Examining data/theano-1.0.5+dfsg/theano/gpuarray/c_code/dnn_sptf_gi.c Examining data/theano-1.0.5+dfsg/theano/gpuarray/c_code/dnn_sptf_grid.c Examining data/theano-1.0.5+dfsg/theano/gpuarray/c_code/dnn_sptf_gt.c Examining data/theano-1.0.5+dfsg/theano/gpuarray/c_code/dnn_sptf_sampler.c Examining data/theano-1.0.5+dfsg/theano/gpuarray/c_code/gpuarray_helper.h Examining data/theano-1.0.5+dfsg/theano/gpuarray/c_code/magma_cholesky.c Examining data/theano-1.0.5+dfsg/theano/gpuarray/c_code/magma_eigh.c Examining data/theano-1.0.5+dfsg/theano/gpuarray/c_code/magma_inv.c Examining data/theano-1.0.5+dfsg/theano/gpuarray/c_code/magma_qr.c Examining data/theano-1.0.5+dfsg/theano/gpuarray/c_code/magma_svd.c Examining data/theano-1.0.5+dfsg/theano/gpuarray/c_code/pool.c Examining data/theano-1.0.5+dfsg/theano/gpuarray/c_code/pool_ave_grad.c Examining data/theano-1.0.5+dfsg/theano/gpuarray/c_code/pool_grad_grad.c Examining data/theano-1.0.5+dfsg/theano/gpuarray/c_code/pool_max_grad.c Examining data/theano-1.0.5+dfsg/theano/gpuarray/c_code/pool_max_rop.c Examining data/theano-1.0.5+dfsg/theano/gpuarray/tests/c_code/tstgpueye.c Examining data/theano-1.0.5+dfsg/theano/scalar/c_code/gamma.c Examining data/theano-1.0.5+dfsg/theano/scan_module/c_code/scan_perform.c Examining data/theano-1.0.5+dfsg/theano/tensor/c_code/alt_blas_common.h Examining data/theano-1.0.5+dfsg/theano/tensor/c_code/alt_blas_template.c Examining data/theano-1.0.5+dfsg/theano/tensor/c_code/dimshuffle.c Examining data/theano-1.0.5+dfsg/theano/tensor/nnet/c_code/corr3d_gemm.c Examining data/theano-1.0.5+dfsg/theano/tensor/nnet/c_code/corr_gemm.c Examining data/theano-1.0.5+dfsg/theano/tensor/nnet/c_code/ctc_wrapper.c FINAL RESULTS: data/theano-1.0.5+dfsg/theano/scan_module/c_code/scan_perform.c:737:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); data/theano-1.0.5+dfsg/theano/tensor/c_code/alt_blas_common.h:10:93: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define alt_fatal_error(message) { if (PyErr_Occurred()) PyErr_Print(); if(message != NULL) fprintf(stderr, message); exit(-1); } data/theano-1.0.5+dfsg/theano/gpuarray/c_code/dnn_conv_base.c:241:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char data_type_configuration[5]; data/theano-1.0.5+dfsg/theano/gpuarray/c_code/dnn_fwd.c:29:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char algorithm_name[128]; data/theano-1.0.5+dfsg/theano/gpuarray/c_code/dnn_fwd.c:230:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pci_id[16]; data/theano-1.0.5+dfsg/theano/gpuarray/c_code/dnn_gi.c:29:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char algorithm_name[128]; data/theano-1.0.5+dfsg/theano/gpuarray/c_code/dnn_gi.c:200:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pci_id[16]; data/theano-1.0.5+dfsg/theano/gpuarray/c_code/dnn_gw.c:29:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char algorithm_name[128]; data/theano-1.0.5+dfsg/theano/gpuarray/c_code/dnn_gw.c:187:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pci_id[16]; data/theano-1.0.5+dfsg/theano/scan_module/c_code/scan_perform.c:690:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ascii_chars[128]; data/theano-1.0.5+dfsg/theano/scan_module/c_code/scan_perform.c:15001:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ctversion[4], rtversion[4]; data/theano-1.0.5+dfsg/theano/scan_module/c_code/scan_perform.c:15005:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char message[200]; data/theano-1.0.5+dfsg/theano/scan_module/c_code/scan_perform.c:15042:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char warning[200]; data/theano-1.0.5+dfsg/theano/scan_module/c_code/scan_perform.c:615:87: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s)) data/theano-1.0.5+dfsg/theano/scan_module/c_code/scan_perform.c:735:52: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c)); data/theano-1.0.5+dfsg/theano/scan_module/c_code/scan_perform.c:15132:65: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str)); ANALYSIS SUMMARY: Hits = 16 Lines analyzed = 27208 in approximately 0.92 seconds (29684 lines/second) Physical Source Lines of Code (SLOC) = 20003 Hits@level = [0] 32 [1] 3 [2] 11 [3] 0 [4] 2 [5] 0 Hits@level+ = [0+] 48 [1+] 16 [2+] 13 [3+] 2 [4+] 2 [5+] 0 Hits/KSLOC@level+ = [0+] 2.39964 [1+] 0.79988 [2+] 0.649903 [3+] 0.099985 [4+] 0.099985 [5+] 0 Dot directories skipped = 7 (--followdotdir overrides) Minimum risk level = 1 Not every hit is necessarily a security vulnerability. There may be other security vulnerabilities; review your code! See 'Secure Programming HOWTO' (https://dwheeler.com/secure-programs) for more information.