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/mwparserfromhell-0.5.4/mwparserfromhell/parser/ctokenizer/avl_tree.c Examining data/mwparserfromhell-0.5.4/mwparserfromhell/parser/ctokenizer/avl_tree.h Examining data/mwparserfromhell-0.5.4/mwparserfromhell/parser/ctokenizer/common.h Examining data/mwparserfromhell-0.5.4/mwparserfromhell/parser/ctokenizer/contexts.h Examining data/mwparserfromhell-0.5.4/mwparserfromhell/parser/ctokenizer/definitions.c Examining data/mwparserfromhell-0.5.4/mwparserfromhell/parser/ctokenizer/definitions.h Examining data/mwparserfromhell-0.5.4/mwparserfromhell/parser/ctokenizer/tag_data.c Examining data/mwparserfromhell-0.5.4/mwparserfromhell/parser/ctokenizer/tag_data.h Examining data/mwparserfromhell-0.5.4/mwparserfromhell/parser/ctokenizer/textbuffer.c Examining data/mwparserfromhell-0.5.4/mwparserfromhell/parser/ctokenizer/textbuffer.h Examining data/mwparserfromhell-0.5.4/mwparserfromhell/parser/ctokenizer/tok_parse.c Examining data/mwparserfromhell-0.5.4/mwparserfromhell/parser/ctokenizer/tok_parse.h Examining data/mwparserfromhell-0.5.4/mwparserfromhell/parser/ctokenizer/tok_support.c Examining data/mwparserfromhell-0.5.4/mwparserfromhell/parser/ctokenizer/tok_support.h Examining data/mwparserfromhell-0.5.4/mwparserfromhell/parser/ctokenizer/tokenizer.c Examining data/mwparserfromhell-0.5.4/mwparserfromhell/parser/ctokenizer/tokenizer.h Examining data/mwparserfromhell-0.5.4/mwparserfromhell/parser/ctokenizer/tokens.c Examining data/mwparserfromhell-0.5.4/mwparserfromhell/parser/ctokenizer/tokens.h FINAL RESULTS: data/mwparserfromhell-0.5.4/mwparserfromhell/parser/ctokenizer/tok_parse.c:1026:9: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. If the scanf format is influenceable by an attacker, it's exploitable. sscanf(text, (hexadecimal ? "%x" : "%d"), &test); data/mwparserfromhell-0.5.4/mwparserfromhell/parser/ctokenizer/tok_parse.c:1050:9: [4] (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). strcat(buffer, text); data/mwparserfromhell-0.5.4/mwparserfromhell/parser/ctokenizer/textbuffer.c:78: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(newdata, self->data, self->length * self->kind); data/mwparserfromhell-0.5.4/mwparserfromhell/parser/ctokenizer/textbuffer.c:201: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(((Py_UCS1*) self->data) + self->kind * self->length, other->data, data/mwparserfromhell-0.5.4/mwparserfromhell/parser/ctokenizer/textbuffer.c:204: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(self->data + self->length, other->data, data/mwparserfromhell-0.5.4/mwparserfromhell/parser/ctokenizer/tok_parse.c:204:17: [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 text[MAX_BRACES + 1]; data/mwparserfromhell-0.5.4/mwparserfromhell/parser/ctokenizer/tok_parse.c:1042:25: [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). buffer = calloc(strlen(text) + zeroes + 1, sizeof(char)); data/mwparserfromhell-0.5.4/mwparserfromhell/parser/ctokenizer/tok_parse.c:1049:13: [1] (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 character. strcat(buffer, "0"); data/mwparserfromhell-0.5.4/mwparserfromhell/parser/ctokenizer/tok_parse.c:2115: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). if (close_open_markup && strlen(close_open_markup) != 0) { data/mwparserfromhell-0.5.4/mwparserfromhell/parser/ctokenizer/tok_parse.c:2346: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). self->head += strlen(markup); ANALYSIS SUMMARY: Hits = 10 Lines analyzed = 5914 in approximately 0.17 seconds (34228 lines/second) Physical Source Lines of Code (SLOC) = 4098 Hits@level = [0] 0 [1] 4 [2] 4 [3] 0 [4] 2 [5] 0 Hits@level+ = [0+] 10 [1+] 10 [2+] 6 [3+] 2 [4+] 2 [5+] 0 Hits/KSLOC@level+ = [0+] 2.44021 [1+] 2.44021 [2+] 1.46413 [3+] 0.488043 [4+] 0.488043 [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.