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/libtext-markdown-discount-perl-0.12/ppport.h Examining data/libtext-markdown-discount-perl-0.12/discount/xml.c Examining data/libtext-markdown-discount-perl-0.12/discount/tools/cols.c Examining data/libtext-markdown-discount-perl-0.12/discount/tools/echo.c Examining data/libtext-markdown-discount-perl-0.12/discount/generate.c Examining data/libtext-markdown-discount-perl-0.12/discount/tags.c Examining data/libtext-markdown-discount-perl-0.12/discount/resource.c Examining data/libtext-markdown-discount-perl-0.12/discount/pgm_options.h Examining data/libtext-markdown-discount-perl-0.12/discount/css.c Examining data/libtext-markdown-discount-perl-0.12/discount/amalloc.c Examining data/libtext-markdown-discount-perl-0.12/discount/xmlpage.c Examining data/libtext-markdown-discount-perl-0.12/discount/docheader.c Examining data/libtext-markdown-discount-perl-0.12/discount/markdown.c Examining data/libtext-markdown-discount-perl-0.12/discount/mkdio.c Examining data/libtext-markdown-discount-perl-0.12/discount/cstring.h Examining data/libtext-markdown-discount-perl-0.12/discount/basename.c Examining data/libtext-markdown-discount-perl-0.12/discount/html5.c Examining data/libtext-markdown-discount-perl-0.12/discount/makepage.c Examining data/libtext-markdown-discount-perl-0.12/discount/setup.c Examining data/libtext-markdown-discount-perl-0.12/discount/mktags.c Examining data/libtext-markdown-discount-perl-0.12/discount/theme.c Examining data/libtext-markdown-discount-perl-0.12/discount/main.c Examining data/libtext-markdown-discount-perl-0.12/discount/mkd2html.c Examining data/libtext-markdown-discount-perl-0.12/discount/pgm_options.c Examining data/libtext-markdown-discount-perl-0.12/discount/github_flavoured.c Examining data/libtext-markdown-discount-perl-0.12/discount/Csio.c Examining data/libtext-markdown-discount-perl-0.12/discount/tags.h Examining data/libtext-markdown-discount-perl-0.12/discount/amalloc.h Examining data/libtext-markdown-discount-perl-0.12/discount/flags.c Examining data/libtext-markdown-discount-perl-0.12/discount/dumptree.c Examining data/libtext-markdown-discount-perl-0.12/discount/emmatch.c Examining data/libtext-markdown-discount-perl-0.12/discount/markdown.h Examining data/libtext-markdown-discount-perl-0.12/discount/toc.c FINAL RESULTS: data/libtext-markdown-discount-perl-0.12/discount/Csio.c:29:8: [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. siz = vsnprintf(T(*iot)+S(*iot), ALLOCATED(*iot)-S(*iot), fmt, ptr); data/libtext-markdown-discount-perl-0.12/discount/basename.c:24:2: [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(ret, base); data/libtext-markdown-discount-perl-0.12/discount/flags.c:62:6: [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(f, htmlplease ? "<s>" : "!"); data/libtext-markdown-discount-perl-0.12/discount/generate.c:165:5: [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. vsnprintf(bfr, sizeof bfr, fmt, ptr); data/libtext-markdown-discount-perl-0.12/discount/main.c:56:5: [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(stderr, fmt, ptr); data/libtext-markdown-discount-perl-0.12/discount/markdown.c:820:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(p->ident, "%s=\"%.*s\"", prefix, S(q->text)-(i+2), data/libtext-markdown-discount-perl-0.12/discount/mkd2html.c:61:5: [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(stderr, why, ptr); data/libtext-markdown-discount-perl-0.12/discount/mkd2html.c:118:2: [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(source, argv[1]); data/libtext-markdown-discount-perl-0.12/discount/mkd2html.c:129:2: [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(dest, source); data/libtext-markdown-discount-perl-0.12/discount/pgm_options.c:97:7: [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, opts[i].off ? "disable " : "enable "); data/libtext-markdown-discount-perl-0.12/discount/theme.c:123:5: [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(stderr, why, ptr); data/libtext-markdown-discount-perl-0.12/discount/theme.c:565:2: [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(source,argv[0]); data/libtext-markdown-discount-perl-0.12/discount/theme.c:580:6: [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(output, source); data/libtext-markdown-discount-perl-0.12/ppport.h:6285: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/libtext-markdown-discount-perl-0.12/ppport.h:6287:14: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. retval = vsprintf(buffer, format, ap); data/libtext-markdown-discount-perl-0.12/discount/amalloc.c:106:10: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if ( getenv("AMALLOC_STATISTICS") ) { data/libtext-markdown-discount-perl-0.12/discount/main.c:84:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if ( q = getenv("MARKDOWN_FLAGS") ) data/libtext-markdown-discount-perl-0.12/discount/main.c:90:18: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ( (opt=getopt(argc, argv, "5b:C:df:E:F:Gno:s:St:TV")) != EOF ) { data/libtext-markdown-discount-perl-0.12/discount/makepage.c:35:15: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if ( (q = getenv("MARKDOWN_FLAGS")) ) data/libtext-markdown-discount-perl-0.12/discount/makepage.c:40:18: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ( (opt=getopt(argc, argv, "F:f:V")) != EOF ) { data/libtext-markdown-discount-perl-0.12/discount/theme.c:518:18: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ( (opt=getopt(argc, argv, "EfC:c:d:t:p:o:V")) != EOF ) { data/libtext-markdown-discount-perl-0.12/discount/Csio.c:44:5: [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(T(*iot)+S(*iot), bfr, size); data/libtext-markdown-discount-perl-0.12/discount/cstring.h:40:6: [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(((S(t) += (sz)) - (sz)) + \ data/libtext-markdown-discount-perl-0.12/discount/cstring.h:48:6: [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( T(t), (p), (sz) ); \ data/libtext-markdown-discount-perl-0.12/discount/emmatch.c:95: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 open[10]; data/libtext-markdown-discount-perl-0.12/discount/emmatch.c:95:10: [2] (misc) open: 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). char open[10]; data/libtext-markdown-discount-perl-0.12/discount/emmatch.c:96: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 close[10]; data/libtext-markdown-discount-perl-0.12/discount/emmatch.c:144:40: [2] (misc) open: 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). PREFIX(start->b_text, emtags[match-1].open, emtags[match-1].size-1); data/libtext-markdown-discount-perl-0.12/discount/generate.c:161: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 bfr[80]; data/libtext-markdown-discount-perl-0.12/discount/mkd2html.c:124: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). if ( (input = fopen(source, "r")) == 0 ) { data/libtext-markdown-discount-perl-0.12/discount/mkd2html.c:125:6: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(source, ".text"); data/libtext-markdown-discount-perl-0.12/discount/mkd2html.c:126:20: [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). if ( (input = fopen(source, "r")) == 0 ) data/libtext-markdown-discount-perl-0.12/discount/mkd2html.c:133:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(dest, ".html"); data/libtext-markdown-discount-perl-0.12/discount/mkd2html.c:135:17: [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). if ( (output = fopen(dest, "w")) == 0 ) data/libtext-markdown-discount-perl-0.12/discount/theme.c:70:18: [2] (misc) open: 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). #define pushd(d) open(d, O_RDONLY) data/libtext-markdown-discount-perl-0.12/discount/theme.c:150:21: [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). while ( !(ret = fopen(template, "r")) ) { data/libtext-markdown-discount-perl-0.12/discount/theme.c:271:12: [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). if (( f = fopen(T(include), "r") )) { data/libtext-markdown-discount-perl-0.12/discount/theme.c:567:6: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(source, "/index"); data/libtext-markdown-discount-perl-0.12/discount/theme.c:570:6: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(source, ".text"); data/libtext-markdown-discount-perl-0.12/discount/theme.c:592:6: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(q, ".html"); data/libtext-markdown-discount-perl-0.12/discount/tools/cols.c:15:22: [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). else if ( (width=atoi(argv[1])) < 1 ) { data/libtext-markdown-discount-perl-0.12/ppport.h:3542: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/libtext-markdown-discount-perl-0.12/ppport.h:6140: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/libtext-markdown-discount-perl-0.12/ppport.h:6336: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/libtext-markdown-discount-perl-0.12/ppport.h:6365: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/libtext-markdown-discount-perl-0.12/discount/basename.c:23:60: [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 ( base && string && (*string == '/') && (ret=malloc(strlen(base)+size+2)) ) { data/libtext-markdown-discount-perl-0.12/discount/basename.c:25:2: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(ret, string, size); data/libtext-markdown-discount-perl-0.12/discount/generate.c:579:19: [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). puturl(edit, strlen(edit), f, 0); data/libtext-markdown-discount-perl-0.12/discount/generate.c:1098:18: [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 ( !(len = strlen(s)) ) data/libtext-markdown-discount-perl-0.12/discount/github_flavoured.c:24:24: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). gfm_populate(getc_func getc, void* ctx, int flags) data/libtext-markdown-discount-perl-0.12/discount/github_flavoured.c:37:20: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ( (c = (*getc)(ctx)) != EOF ) { data/libtext-markdown-discount-perl-0.12/discount/github_flavoured.c:99:36: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return gfm_populate((getc_func)fgetc, f, flags & INPUT_MASK); data/libtext-markdown-discount-perl-0.12/discount/main.c:164:31: [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). rc = mkd_generateline( text, strlen(text), stdout, flags); data/libtext-markdown-discount-perl-0.12/discount/main.c:167:48: [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). doc = github_flavoured ? gfm_string(text, strlen(text), flags) data/libtext-markdown-discount-perl-0.12/discount/main.c:168: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). : mkd_string(text, strlen(text), flags) ; data/libtext-markdown-discount-perl-0.12/discount/markdown.c:819: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). if ( p->ident = malloc(4+strlen(prefix)+S(q->text)) ) data/libtext-markdown-discount-perl-0.12/discount/mkd2html.c:112:18: [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). dest = malloc(strlen(argv[argc-1]) + 6); data/libtext-markdown-discount-perl-0.12/discount/mkd2html.c:113:18: [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). source = malloc(strlen(argv[1]) + 6); data/libtext-markdown-discount-perl-0.12/discount/mkd2html.c:171: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). mkd_generateline(h, strlen(h), output, 0); data/libtext-markdown-discount-perl-0.12/discount/mkdio.c:91:20: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). populate(getc_func getc, void* ctx, int flags) data/libtext-markdown-discount-perl-0.12/discount/mkdio.c:104:20: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ( (c = (*getc)(ctx)) != EOF ) { data/libtext-markdown-discount-perl-0.12/discount/mkdio.c:147:32: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return populate((getc_func)fgetc, f, flags & INPUT_MASK); data/libtext-markdown-discount-perl-0.12/discount/mktags.c:20: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). p->size = strlen(id); data/libtext-markdown-discount-perl-0.12/discount/tags.c:28:36: [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 ( !(p = mkd_search_tags(id, strlen(id))) ) { data/libtext-markdown-discount-perl-0.12/discount/tags.c:34: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). p->size = strlen(id); data/libtext-markdown-discount-perl-0.12/discount/theme.c:145: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). szcwd = root ? 1 + strlen(root) : 2; data/libtext-markdown-discount-perl-0.12/discount/theme.c:181:18: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ( (c = getc(input)) != EOF ) data/libtext-markdown-discount-perl-0.12/discount/theme.c:243:11: [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). c = peek(strlen(pat)+1); data/libtext-markdown-discount-perl-0.12/discount/theme.c:272:19: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ( (c = getc(f)) != EOF ) data/libtext-markdown-discount-perl-0.12/discount/theme.c:289:19: [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). fwrite(pagename, strlen(pagename)-strlen(p), 1, output); data/libtext-markdown-discount-perl-0.12/discount/theme.c:289:36: [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). fwrite(pagename, strlen(pagename)-strlen(p), 1, output); data/libtext-markdown-discount-perl-0.12/discount/theme.c:307:16: [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). fwrite(p, strlen(p), 1, output); data/libtext-markdown-discount-perl-0.12/discount/theme.c:322: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). mkd_generateline(h, strlen(h), output, flags); data/libtext-markdown-discount-perl-0.12/discount/theme.c:334: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). mkd_generateline(h, strlen(h), output, flags|MKD_TAGTEXT); data/libtext-markdown-discount-perl-0.12/discount/theme.c:351: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). mkd_generateline(h, strlen(h), output, flags); data/libtext-markdown-discount-perl-0.12/discount/theme.c:370: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). fwrite(markdown_version, strlen(markdown_version), 1, output); data/libtext-markdown-discount-perl-0.12/discount/theme.c:455:9: [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). shift(strlen("?theme ")); data/libtext-markdown-discount-perl-0.12/discount/theme.c:562: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). if ( (source = malloc(strlen(argv[0]) + strlen("/index.text") + 1)) == 0 ) data/libtext-markdown-discount-perl-0.12/discount/theme.c:562:42: [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 ( (source = malloc(strlen(argv[0]) + strlen("/index.text") + 1)) == 0 ) data/libtext-markdown-discount-perl-0.12/discount/theme.c:578: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). output = alloca(strlen(source) + strlen(".html") + 1); data/libtext-markdown-discount-perl-0.12/discount/theme.c:578:39: [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). output = alloca(strlen(source) + strlen(".html") + 1); data/libtext-markdown-discount-perl-0.12/discount/theme.c:590:16: [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). q = output + strlen(output); data/libtext-markdown-discount-perl-0.12/discount/tools/cols.c:21:24: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for ( xp = 1; (c = getchar()) != EOF; xp++ ) { data/libtext-markdown-discount-perl-0.12/discount/tools/cols.c:29:21: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). } while ( (c = getchar()) != EOF && (c & 0x80) && !(c & 0x40) ); data/libtext-markdown-discount-perl-0.12/discount/xml.c:73:26: [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). Cswrite(&f, entity, strlen(entity)); data/libtext-markdown-discount-perl-0.12/ppport.h:4778: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/libtext-markdown-discount-perl-0.12/ppport.h:4786: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/libtext-markdown-discount-perl-0.12/ppport.h:4790: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/libtext-markdown-discount-perl-0.12/ppport.h:4810: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/libtext-markdown-discount-perl-0.12/ppport.h:4838: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/libtext-markdown-discount-perl-0.12/ppport.h:4859: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/libtext-markdown-discount-perl-0.12/ppport.h:4881: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/libtext-markdown-discount-perl-0.12/ppport.h:4909: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/libtext-markdown-discount-perl-0.12/ppport.h:4930: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/libtext-markdown-discount-perl-0.12/ppport.h:5734: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/libtext-markdown-discount-perl-0.12/ppport.h:6332: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/libtext-markdown-discount-perl-0.12/ppport.h:6333: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/libtext-markdown-discount-perl-0.12/ppport.h:6362: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 = 98 Lines analyzed = 13064 in approximately 0.33 seconds (39471 lines/second) Physical Source Lines of Code (SLOC) = 7395 Hits@level = [0] 64 [1] 53 [2] 24 [3] 6 [4] 15 [5] 0 Hits@level+ = [0+] 162 [1+] 98 [2+] 45 [3+] 21 [4+] 15 [5+] 0 Hits/KSLOC@level+ = [0+] 21.9067 [1+] 13.2522 [2+] 6.08519 [3+] 2.83976 [4+] 2.0284 [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.