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/python-misaka-1.0.2/src/misaka.c Examining data/python-misaka-1.0.2/src/sundown/autolink.c Examining data/python-misaka-1.0.2/src/sundown/autolink.h Examining data/python-misaka-1.0.2/src/sundown/buffer.c Examining data/python-misaka-1.0.2/src/sundown/buffer.h Examining data/python-misaka-1.0.2/src/sundown/houdini.h Examining data/python-misaka-1.0.2/src/sundown/houdini_href_e.c Examining data/python-misaka-1.0.2/src/sundown/houdini_html_e.c Examining data/python-misaka-1.0.2/src/sundown/html.c Examining data/python-misaka-1.0.2/src/sundown/html.h Examining data/python-misaka-1.0.2/src/sundown/html_blocks.h Examining data/python-misaka-1.0.2/src/sundown/html_smartypants.c Examining data/python-misaka-1.0.2/src/sundown/markdown.c Examining data/python-misaka-1.0.2/src/sundown/markdown.h Examining data/python-misaka-1.0.2/src/sundown/stack.c Examining data/python-misaka-1.0.2/src/sundown/stack.h Examining data/python-misaka-1.0.2/src/wrapper.c Examining data/python-misaka-1.0.2/src/wrapper.h FINAL RESULTS: data/python-misaka-1.0.2/src/sundown/buffer.c:31:25: [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. # define _buf_vsnprintf vsnprintf data/python-misaka-1.0.2/src/sundown/buffer.h:86:73: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. void bufprintf(struct buf *, const char *, ...) __attribute__ ((format (printf, 2, 3))); data/python-misaka-1.0.2/src/sundown/html_smartypants.c:26:9: [4] (format) snprintf: 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. #define snprintf _snprintf data/python-misaka-1.0.2/src/sundown/html_smartypants.c:26:18: [4] (format) _snprintf: 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. #define snprintf _snprintf data/python-misaka-1.0.2/src/misaka.c:3987: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 ctversion[4], rtversion[4]; data/python-misaka-1.0.2/src/misaka.c:3991:9: [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 message[200]; data/python-misaka-1.0.2/src/sundown/autolink.c:42: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. strncasecmp((char *)link, valid_uris[i], len) == 0 && data/python-misaka-1.0.2/src/sundown/buffer.c:160:2: [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(buf->data + buf->size, data, len); data/python-misaka-1.0.2/src/sundown/houdini_href_e.c:58:2: [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 hex_str[3]; data/python-misaka-1.0.2/src/sundown/html.c:580:2: [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(callbacks, &cb_default, sizeof(struct sd_callbacks)); data/python-misaka-1.0.2/src/sundown/html.c:623:2: [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(callbacks, &cb_default, sizeof(struct sd_callbacks)); data/python-misaka-1.0.2/src/sundown/html_blocks.h:36: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. static unsigned char gperf_downcase[256] = data/python-misaka-1.0.2/src/sundown/html_smartypants.c:89:2: [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 ent[8]; data/python-misaka-1.0.2/src/sundown/markdown.c:2360:2: [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(&md->cb, callbacks, sizeof(struct sd_callbacks)); data/python-misaka-1.0.2/src/misaka.c:993: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). __pyx_t_5 = strlen(__pyx_v_c_string); data/python-misaka-1.0.2/src/misaka.c:1209:58: [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). __pyx_t_2 = ((PyObject *)PyUnicode_Decode(__pyx_t_4, strlen(__pyx_t_4), __pyx_k_3, NULL)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} data/python-misaka-1.0.2/src/sundown/autolink.c:39: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). size_t len = strlen(valid_uris[i]); data/python-misaka-1.0.2/src/sundown/autolink.c:160: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). if (size < 4 || memcmp(data, "www.", strlen("www.")) != 0) data/python-misaka-1.0.2/src/sundown/autolink.c:244: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). link_end = strlen("://"); data/python-misaka-1.0.2/src/sundown/buffer.c:168: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). bufput(buf, str, strlen(str)); data/python-misaka-1.0.2/src/sundown/buffer.h:49: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). { (uint8_t *)strname, strlen(strname), 0, 0, 0 } data/python-misaka-1.0.2/src/sundown/markdown.c:1811: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 tag_size = strlen(curtag); ANALYSIS SUMMARY: Hits = 22 Lines analyzed = 9415 in approximately 0.27 seconds (35005 lines/second) Physical Source Lines of Code (SLOC) = 6871 Hits@level = [0] 1 [1] 8 [2] 10 [3] 0 [4] 4 [5] 0 Hits@level+ = [0+] 23 [1+] 22 [2+] 14 [3+] 4 [4+] 4 [5+] 0 Hits/KSLOC@level+ = [0+] 3.3474 [1+] 3.20186 [2+] 2.03755 [3+] 0.582157 [4+] 0.582157 [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.