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/libparse-exuberantctags-perl-1.02/tagEntry_to_HV.h Examining data/libparse-exuberantctags-perl-1.02/ppport.h Examining data/libparse-exuberantctags-perl-1.02/readtags.h Examining data/libparse-exuberantctags-perl-1.02/readtags.c Examining data/libparse-exuberantctags-perl-1.02/tagEntry_to_HV.c FINAL RESULTS: data/libparse-exuberantctags-perl-1.02/ppport.h:6616: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/libparse-exuberantctags-perl-1.02/ppport.h:6618:14: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. retval = vsprintf(buffer, format, ap); data/libparse-exuberantctags-perl-1.02/ppport.h:6647:5: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. vsprintf(buffer, pat, args); data/libparse-exuberantctags-perl-1.02/readtags.c:888:3: [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. fprintf (stderr, Usage, ProgramName); data/libparse-exuberantctags-perl-1.02/readtags.c:921:8: [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. fprintf (stderr, Usage, ProgramName); data/libparse-exuberantctags-perl-1.02/readtags.c:934:8: [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. fprintf (stderr, Usage, ProgramName); data/libparse-exuberantctags-perl-1.02/ppport.h:3654: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/libparse-exuberantctags-perl-1.02/ppport.h:6471:24: [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/libparse-exuberantctags-perl-1.02/ppport.h:6693: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/libparse-exuberantctags-perl-1.02/ppport.h:6722: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/libparse-exuberantctags-perl-1.02/ppport.h:6814: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/libparse-exuberantctags-perl-1.02/ppport.h:6884:6: [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/libparse-exuberantctags-perl-1.02/readtags.c:278:34: [2] (integer) atol: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). entry->address.lineNumber = atol (value); data/libparse-exuberantctags-perl-1.02/readtags.c:336:33: [2] (integer) atol: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). entry->address.lineNumber = atol (p); data/libparse-exuberantctags-perl-1.02/readtags.c:399:35: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). file->sortMethod = (sortType) atoi (value); data/libparse-exuberantctags-perl-1.02/readtags.c:401:28: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). file->format = (short) atoi (value); data/libparse-exuberantctags-perl-1.02/readtags.c:450:16: [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). result->fp = fopen (filePath, "r"); data/libparse-exuberantctags-perl-1.02/ppport.h:5105: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/libparse-exuberantctags-perl-1.02/ppport.h:5113: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/libparse-exuberantctags-perl-1.02/ppport.h:5117: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/libparse-exuberantctags-perl-1.02/ppport.h:5137: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/libparse-exuberantctags-perl-1.02/ppport.h:5165: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/libparse-exuberantctags-perl-1.02/ppport.h:5186: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/libparse-exuberantctags-perl-1.02/ppport.h:5208: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/libparse-exuberantctags-perl-1.02/ppport.h:5236: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/libparse-exuberantctags-perl-1.02/ppport.h:5257: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/libparse-exuberantctags-perl-1.02/ppport.h:6065: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/libparse-exuberantctags-perl-1.02/ppport.h:6649: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/libparse-exuberantctags-perl-1.02/ppport.h:6689: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/libparse-exuberantctags-perl-1.02/ppport.h:6690: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/libparse-exuberantctags-perl-1.02/ppport.h:6719: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/libparse-exuberantctags-perl-1.02/readtags.c:166: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). length = strlen (file->line.buffer); data/libparse-exuberantctags-perl-1.02/readtags.c:169:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (file->name.buffer, file->line.buffer, length); data/libparse-exuberantctags-perl-1.02/readtags.c:209:15: [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). size_t i = strlen (file->line.buffer); data/libparse-exuberantctags-perl-1.02/readtags.c:374:30: [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). const size_t prefixLength = strlen (PseudoTagPrefix); data/libparse-exuberantctags-perl-1.02/readtags.c:427:30: [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). const size_t prefixLength = strlen (PseudoTagPrefix); data/libparse-exuberantctags-perl-1.02/readtags.c:656:28: [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). file->search.nameLength = strlen (name); data/libparse-exuberantctags-perl-1.02/readtags.c:915:13: [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). j += strlen (TagFileName); data/libparse-exuberantctags-perl-1.02/tagEntry_to_HV.c:74:61: [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). if ( hv_store( extHash, theEntry->fields.list[i].key, strlen(theEntry->fields.list[i].key), sv, 0 ) == NULL ) ANALYSIS SUMMARY: Hits = 39 Lines analyzed = 8279 in approximately 0.20 seconds (41402 lines/second) Physical Source Lines of Code (SLOC) = 3989 Hits@level = [0] 11 [1] 22 [2] 11 [3] 0 [4] 6 [5] 0 Hits@level+ = [0+] 50 [1+] 39 [2+] 17 [3+] 6 [4+] 6 [5+] 0 Hits/KSLOC@level+ = [0+] 12.5345 [1+] 9.77689 [2+] 4.26172 [3+] 1.50414 [4+] 1.50414 [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.