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/linkchecker-9.4.0/linkcheck/HtmlParser/htmllex.c Examining data/linkchecker-9.4.0/linkcheck/HtmlParser/htmlparse.c Examining data/linkchecker-9.4.0/linkcheck/HtmlParser/htmlparse.h Examining data/linkchecker-9.4.0/linkcheck/HtmlParser/htmlsax.h Examining data/linkchecker-9.4.0/linkcheck/HtmlParser/s_util.c Examining data/linkchecker-9.4.0/linkcheck/HtmlParser/s_util.h Examining data/linkchecker-9.4.0/linkcheck/network/_network.c FINAL RESULTS: data/linkchecker-9.4.0/linkcheck/HtmlParser/htmlparse.c:745:21: [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 YYFPRINTF fprintf data/linkchecker-9.4.0/linkcheck/HtmlParser/htmllex.c:3624:9: [2] (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). Risk is low because the source is a constant string. strcpy(yyextra->tmp_buf, "</>"); data/linkchecker-9.4.0/linkcheck/HtmlParser/htmllex.c:3645:9: [2] (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). Risk is low because the source is a constant string. strcpy(yyextra->tmp_buf, "<>"); data/linkchecker-9.4.0/linkcheck/HtmlParser/htmlparse.c:992:3: [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 const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; data/linkchecker-9.4.0/linkcheck/HtmlParser/htmlparse.c:1184:3: [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 yymsgbuf[128]; data/linkchecker-9.4.0/linkcheck/HtmlParser/htmllex.c:2664:40: [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). (Py_ssize_t)strlen(yyextra->tmp_buf), \ data/linkchecker-9.4.0/linkcheck/HtmlParser/htmllex.c:2672:23: [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). (Py_ssize_t)strlen(yyextra->tmp_buf), "ascii", "ignore")) data/linkchecker-9.4.0/linkcheck/HtmlParser/htmllex.c:2692: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). size_t len = strlen(yyextra->tmp_buf) + (n) + 1; \ data/linkchecker-9.4.0/linkcheck/HtmlParser/htmllex.c:2729: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). if (strlen(yyextra->tmp_buf) > 0) { \ data/linkchecker-9.4.0/linkcheck/HtmlParser/htmllex.c:3033:26: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ( (result = (int) read( fileno(yyin), buf, max_size )) < 0 ) \ data/linkchecker-9.4.0/linkcheck/HtmlParser/htmllex.c:3621:10: [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 (!strlen(yyextra->tmp_buf)) { data/linkchecker-9.4.0/linkcheck/HtmlParser/htmllex.c:3642:10: [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 (!strlen(yyextra->tmp_buf)) { data/linkchecker-9.4.0/linkcheck/HtmlParser/htmllex.c:3668:21: [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). RESIZE_BUF(tmp, strlen(yyextra->tmp_buf)+2); data/linkchecker-9.4.0/linkcheck/HtmlParser/htmllex.c:3672:34: [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). RESIZE_BUF(yyextra->tmp_buf, strlen(tmp)+1); data/linkchecker-9.4.0/linkcheck/HtmlParser/htmllex.c:3694:21: [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). RESIZE_BUF(tmp, strlen(yyextra->tmp_buf)+2); data/linkchecker-9.4.0/linkcheck/HtmlParser/htmllex.c:3698:34: [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). RESIZE_BUF(yyextra->tmp_buf, strlen(tmp)+1); data/linkchecker-9.4.0/linkcheck/HtmlParser/htmllex.c:5538:35: [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 yy_scan_bytes(yystr,(int) strlen(yystr) ,yyscanner); data/linkchecker-9.4.0/linkcheck/HtmlParser/htmllex.c:5984: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). size_t len = strlen(data->buf); data/linkchecker-9.4.0/linkcheck/HtmlParser/htmllex.c:6018: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 len = strlen(data->buf); data/linkchecker-9.4.0/linkcheck/HtmlParser/htmlparse.c:892:21: [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 yystrlen strlen data/linkchecker-9.4.0/linkcheck/HtmlParser/htmlparse.c:2116: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). if (strlen(self->userData->buf)) { data/linkchecker-9.4.0/linkcheck/HtmlParser/htmlparse.c:2124:21: [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). for (i=0; i<strlen(self->userData->buf); ++i) { data/linkchecker-9.4.0/linkcheck/HtmlParser/htmlparse.c:2133: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). (Py_ssize_t)strlen(self->userData->buf), enc, "ignore"); data/linkchecker-9.4.0/linkcheck/HtmlParser/htmlparse.c:2224: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). buflen = strlen(self->userData->buf); data/linkchecker-9.4.0/linkcheck/HtmlParser/s_util.c:22: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). size_t ret = strlen(src); data/linkchecker-9.4.0/linkcheck/HtmlParser/s_util.c:41:20: [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 dsize = strlen(dst); data/linkchecker-9.4.0/linkcheck/HtmlParser/s_util.c:42: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). size_t len = strlen(src); ANALYSIS SUMMARY: Hits = 27 Lines analyzed = 8824 in approximately 0.26 seconds (33720 lines/second) Physical Source Lines of Code (SLOC) = 6291 Hits@level = [0] 11 [1] 22 [2] 4 [3] 0 [4] 1 [5] 0 Hits@level+ = [0+] 38 [1+] 27 [2+] 5 [3+] 1 [4+] 1 [5+] 0 Hits/KSLOC@level+ = [0+] 6.04038 [1+] 4.29185 [2+] 0.794786 [3+] 0.158957 [4+] 0.158957 [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.