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/libimage-seek-perl-0.06/haar.cpp Examining data/libimage-seek-perl-0.06/haar.h Examining data/libimage-seek-perl-0.06/imgdb.cpp Examining data/libimage-seek-perl-0.06/imgdb.h Examining data/libimage-seek-perl-0.06/ppport.h FINAL RESULTS: data/libimage-seek-perl-0.06/ppport.h:7380:14: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. retval = vsnprintf(buffer, len, format, ap); data/libimage-seek-perl-0.06/ppport.h:7382:14: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. retval = vsprintf(buffer, format, ap); data/libimage-seek-perl-0.06/ppport.h:7411:5: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. vsprintf(buffer, pat, args); data/libimage-seek-perl-0.06/haar.cpp:98:7: [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(d1+i*128,Ab1,2*h*sizeof(double)); data/libimage-seek-perl-0.06/haar.cpp:99:7: [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(d2+i*128,Ab2,2*h*sizeof(double)); data/libimage-seek-perl-0.06/haar.cpp:100:7: [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(d3+i*128,Ab3,2*h*sizeof(double)); data/libimage-seek-perl-0.06/haar.cpp:129: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(a,d1,16384*sizeof(double)); data/libimage-seek-perl-0.06/haar.cpp:130: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(b,d2,16384*sizeof(double)); data/libimage-seek-perl-0.06/haar.cpp:131: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(c,d3,16384*sizeof(double)); data/libimage-seek-perl-0.06/haar.cpp:172:7: [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(d1+i*128,Ab1,2*h*sizeof(double)); data/libimage-seek-perl-0.06/haar.cpp:173:7: [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(d2+i*128,Ab2,2*h*sizeof(double)); data/libimage-seek-perl-0.06/haar.cpp:174:7: [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(d3+i*128,Ab3,2*h*sizeof(double)); data/libimage-seek-perl-0.06/haar.cpp:203: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(a,d1,16384*sizeof(double)); data/libimage-seek-perl-0.06/haar.cpp:204: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(b,d2,16384*sizeof(double)); data/libimage-seek-perl-0.06/haar.cpp:205: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(c,d3,16384*sizeof(double)); data/libimage-seek-perl-0.06/ppport.h:4110:42: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. # define CopyD(s,d,n,t) memcpy((char*)(d),(char*)(s), (n) * sizeof(t)) data/libimage-seek-perl-0.06/ppport.h:7235:38: [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. && (xdigit = strchr((char *) PL_hexdigit, s[1]))) data/libimage-seek-perl-0.06/ppport.h:7457:9: [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(dst + used, src, copy); data/libimage-seek-perl-0.06/ppport.h:7486:9: [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(dst, src, copy); data/libimage-seek-perl-0.06/ppport.h:7578: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 octbuf[32] = "%123456789ABCDF"; data/libimage-seek-perl-0.06/ppport.h:7648:13: [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 tmp[2]; data/libimage-seek-perl-0.06/imgdb.cpp:134:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). f.read ((char*)&(sz), sizeof(int) ); data/libimage-seek-perl-0.06/imgdb.cpp:136:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). f.read ((char*)&(id), sizeof(long int) ); data/libimage-seek-perl-0.06/imgdb.cpp:141:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). f.read ((char*)&(sz), sizeof(int) ); data/libimage-seek-perl-0.06/imgdb.cpp:143:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). f.read ((char*)&(id), sizeof(long int) ); data/libimage-seek-perl-0.06/imgdb.cpp:152:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). f.read ((char*)&(coef), sizeof( int) ); data/libimage-seek-perl-0.06/imgdb.cpp:154:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). f.read ((char*)&(coef), sizeof( int) ); data/libimage-seek-perl-0.06/imgdb.cpp:156:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). f.read ((char*)&(coef), sizeof( int) ); data/libimage-seek-perl-0.06/imgdb.cpp:161:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). f.read ((char*)&(sigs[id]->avgl[c]), sizeof( double) ); data/libimage-seek-perl-0.06/ppport.h:5631:24: [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). sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*)); data/libimage-seek-perl-0.06/ppport.h:5639:59: [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 sv_vcatpvf(sv, pat, args) sv_vcatpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*)) data/libimage-seek-perl-0.06/ppport.h:5643:59: [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 sv_vsetpvf(sv, pat, args) sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*)) data/libimage-seek-perl-0.06/ppport.h:5663:24: [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). sv_vcatpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*)); data/libimage-seek-perl-0.06/ppport.h:5691:24: [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). sv_vcatpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*)); data/libimage-seek-perl-0.06/ppport.h:5712:27: [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). sv_vcatpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*)); \ data/libimage-seek-perl-0.06/ppport.h:5734:24: [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). sv_vsetpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*)); data/libimage-seek-perl-0.06/ppport.h:5762:24: [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). sv_vsetpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*)); data/libimage-seek-perl-0.06/ppport.h:5783:27: [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). sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*)); \ data/libimage-seek-perl-0.06/ppport.h:5837: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). # define HvNAMELEN_get(hv) (HvNAME_get(hv) ? (I32)strlen(HvNAME_get(hv)) : 0) data/libimage-seek-perl-0.06/ppport.h:6829:22: [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). STRLEN len = strlen(radix); data/libimage-seek-perl-0.06/ppport.h:7413:12: [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 strlen(buffer); data/libimage-seek-perl-0.06/ppport.h:7453:12: [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). used = strlen(dst); data/libimage-seek-perl-0.06/ppport.h:7454:14: [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). length = strlen(src); data/libimage-seek-perl-0.06/ppport.h:7483:14: [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). length = strlen(src); ANALYSIS SUMMARY: Hits = 44 Lines analyzed = 8426 in approximately 0.28 seconds (29863 lines/second) Physical Source Lines of Code (SLOC) = 3766 Hits@level = [0] 0 [1] 23 [2] 18 [3] 0 [4] 3 [5] 0 Hits@level+ = [0+] 44 [1+] 44 [2+] 21 [3+] 3 [4+] 3 [5+] 0 Hits/KSLOC@level+ = [0+] 11.6835 [1+] 11.6835 [2+] 5.57621 [3+] 0.796601 [4+] 0.796601 [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.