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/libdr-sundown-perl-0.02/sundown/examples/smartypants.c
Examining data/libdr-sundown-perl-0.02/sundown/examples/sundown.c
Examining data/libdr-sundown-perl-0.02/sundown/src/autolink.h
Examining data/libdr-sundown-perl-0.02/sundown/src/html_blocks.h
Examining data/libdr-sundown-perl-0.02/sundown/src/markdown.h
Examining data/libdr-sundown-perl-0.02/sundown/src/stack.c
Examining data/libdr-sundown-perl-0.02/sundown/src/buffer.h
Examining data/libdr-sundown-perl-0.02/sundown/src/stack.h
Examining data/libdr-sundown-perl-0.02/sundown/src/autolink.c
Examining data/libdr-sundown-perl-0.02/sundown/src/buffer.c
Examining data/libdr-sundown-perl-0.02/sundown/src/markdown.c
Examining data/libdr-sundown-perl-0.02/sundown/html/houdini_href_e.c
Examining data/libdr-sundown-perl-0.02/sundown/html/html_smartypants.c
Examining data/libdr-sundown-perl-0.02/sundown/html/html.c
Examining data/libdr-sundown-perl-0.02/sundown/html/html.h
Examining data/libdr-sundown-perl-0.02/sundown/html/houdini.h
Examining data/libdr-sundown-perl-0.02/sundown/html/houdini_html_e.c

FINAL RESULTS:

data/libdr-sundown-perl-0.02/sundown/html/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/libdr-sundown-perl-0.02/sundown/html/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/libdr-sundown-perl-0.02/sundown/src/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/libdr-sundown-perl-0.02/sundown/src/buffer.h:90: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/libdr-sundown-perl-0.02/sundown/examples/smartypants.c:39:8:  [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).
		in = fopen(argv[1], "r");
data/libdr-sundown-perl-0.02/sundown/examples/sundown.c:43:8:  [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).
		in = fopen(argv[1], "r");
data/libdr-sundown-perl-0.02/sundown/html/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/libdr-sundown-perl-0.02/sundown/html/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/libdr-sundown-perl-0.02/sundown/html/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/libdr-sundown-perl-0.02/sundown/html/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/libdr-sundown-perl-0.02/sundown/src/autolink.c:43: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/libdr-sundown-perl-0.02/sundown/src/buffer.c:162: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/libdr-sundown-perl-0.02/sundown/src/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/libdr-sundown-perl-0.02/sundown/src/markdown.c:2406: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/libdr-sundown-perl-0.02/sundown/src/autolink.c:40: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/libdr-sundown-perl-0.02/sundown/src/autolink.c:175: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/libdr-sundown-perl-0.02/sundown/src/autolink.c:272: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/libdr-sundown-perl-0.02/sundown/src/buffer.c:170: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/libdr-sundown-perl-0.02/sundown/src/buffer.h:53: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/libdr-sundown-perl-0.02/sundown/src/markdown.c:1857: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 = 20
Lines analyzed = 5155 in approximately 0.14 seconds (35983 lines/second)
Physical Source Lines of Code (SLOC) = 3606
Hits@level = [0]   5 [1]   6 [2]  10 [3]   0 [4]   4 [5]   0
Hits@level+ = [0+]  25 [1+]  20 [2+]  14 [3+]   4 [4+]   4 [5+]   0
Hits/KSLOC@level+ = [0+] 6.93289 [1+] 5.54631 [2+] 3.88242 [3+] 1.10926 [4+] 1.10926 [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.