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/libalgorithm-svm-perl-0.13/libsvm.cpp Examining data/libalgorithm-svm-perl-0.13/libsvm.h Examining data/libalgorithm-svm-perl-0.13/bindings.h Examining data/libalgorithm-svm-perl-0.13/bindings.cpp FINAL RESULTS: data/libalgorithm-svm-perl-0.13/bindings.cpp:9:2: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stdout,a,alist); data/libalgorithm-svm-perl-0.13/libsvm.cpp:42:2: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vprintf(fmt,ap); data/libalgorithm-svm-perl-0.13/bindings.cpp:39:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(address,attributes,sizeof(struct svm_node)*(n+1)); data/libalgorithm-svm-perl-0.13/bindings.cpp:50:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(address,attributes,sizeof(struct svm_node)*(n+1)); data/libalgorithm-svm-perl-0.13/libsvm.cpp:21:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((void *)dst,(void *)src,sizeof(T)*n); data/libalgorithm-svm-perl-0.13/libsvm.cpp:2620:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *fp = fopen(model_file_name,"w"); data/libalgorithm-svm-perl-0.13/libsvm.cpp:2707:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *fp = fopen(model_file_name,"r"); data/libalgorithm-svm-perl-0.13/libsvm.cpp:2720:2: [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 cmd[81]; data/libalgorithm-svm-perl-0.13/libsvm.cpp:2723:3: [1] (buffer) fscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. fscanf(fp,"%80s",cmd); data/libalgorithm-svm-perl-0.13/libsvm.cpp:2727:4: [1] (buffer) fscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. fscanf(fp,"%80s",cmd); data/libalgorithm-svm-perl-0.13/libsvm.cpp:2749:4: [1] (buffer) fscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. fscanf(fp,"%80s",cmd); data/libalgorithm-svm-perl-0.13/libsvm.cpp:2818:13: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int c = getc(fp); data/libalgorithm-svm-perl-0.13/libsvm.cpp:2841:11: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int c = fgetc(fp); data/libalgorithm-svm-perl-0.13/libsvm.cpp:2878:9: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc(fp); ANALYSIS SUMMARY: Hits = 14 Lines analyzed = 3620 in approximately 0.10 seconds (34669 lines/second) Physical Source Lines of Code (SLOC) = 3051 Hits@level = [0] 43 [1] 6 [2] 6 [3] 0 [4] 2 [5] 0 Hits@level+ = [0+] 57 [1+] 14 [2+] 8 [3+] 2 [4+] 2 [5+] 0 Hits/KSLOC@level+ = [0+] 18.6824 [1+] 4.58866 [2+] 2.62209 [3+] 0.655523 [4+] 0.655523 [5+] 0 Dot directories skipped = 1 (--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.