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/liblognorm-2.0.5/tests/json_eq.c
Examining data/liblognorm-2.0.5/tools/logrecord.h
Examining data/liblognorm-2.0.5/compat/strndup.c
Examining data/liblognorm-2.0.5/src/v1_ptree.c
Examining data/liblognorm-2.0.5/src/lognorm.h
Examining data/liblognorm-2.0.5/src/v1_liblognorm.c
Examining data/liblognorm-2.0.5/src/v1_ptree.h
Examining data/liblognorm-2.0.5/src/pdag.h
Examining data/liblognorm-2.0.5/src/enc_syslog.c
Examining data/liblognorm-2.0.5/src/v1_parser.c
Examining data/liblognorm-2.0.5/src/enc_xml.c
Examining data/liblognorm-2.0.5/src/enc.h
Examining data/liblognorm-2.0.5/src/lognorm-features.h
Examining data/liblognorm-2.0.5/src/v1_parser.h
Examining data/liblognorm-2.0.5/src/samp.c
Examining data/liblognorm-2.0.5/src/helpers.h
Examining data/liblognorm-2.0.5/src/liblognorm.h
Examining data/liblognorm-2.0.5/src/annot.c
Examining data/liblognorm-2.0.5/src/annot.h
Examining data/liblognorm-2.0.5/src/parser.h
Examining data/liblognorm-2.0.5/src/liblognorm.c
Examining data/liblognorm-2.0.5/src/lognormalizer.c
Examining data/liblognorm-2.0.5/src/internal.h
Examining data/liblognorm-2.0.5/src/parser.c
Examining data/liblognorm-2.0.5/src/v1_samp.c
Examining data/liblognorm-2.0.5/src/v1_liblognorm.h
Examining data/liblognorm-2.0.5/src/v1_samp.h
Examining data/liblognorm-2.0.5/src/enc_csv.c
Examining data/liblognorm-2.0.5/src/lognorm.c
Examining data/liblognorm-2.0.5/src/pdag.c
Examining data/liblognorm-2.0.5/src/samp.h

FINAL RESULTS:

data/liblognorm-2.0.5/src/lognorm.c:67:11:  [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.
	lenBuf = vsnprintf(buf, sizeof(buf), fmt, ap);
data/liblognorm-2.0.5/src/lognorm.c:105:11:  [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.
	lenBuf = vsnprintf(buf, sizeof(buf), fmt, ap);
data/liblognorm-2.0.5/src/lognorm.h:80:75:  [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 ln_dbgprintf(ln_ctx ctx, const char *fmt, ...) __attribute__((format(printf, 2, 3)));
data/liblognorm-2.0.5/src/lognorm.h:81:90:  [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 ln_errprintf(ln_ctx ctx, const int eno, const char *fmt, ...) __attribute__((format(printf, 3, 4)));
data/liblognorm-2.0.5/src/lognormalizer.c:355:15:  [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, "d:s:S:e:r:R:E:vVpPt:To:hHULx:")) != -1) {
data/liblognorm-2.0.5/src/samp.c:1100:29:  [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.
	const char *const rb_lib = getenv("LIBLOGNORM_RULEBASES");
data/liblognorm-2.0.5/compat/strndup.c:35: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(new_s, s, len);
data/liblognorm-2.0.5/src/enc_csv.c:52:8:  [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 char hexdigit[16] =
data/liblognorm-2.0.5/src/enc_csv.c:69: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 numbuf[4];
data/liblognorm-2.0.5/src/enc_xml.c:47:8:  [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 char hexdigit[16] =
data/liblognorm-2.0.5/src/enc_xml.c:66: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 numbuf[4];
data/liblognorm-2.0.5/src/lognorm.c:60: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 buf[8*1024];
data/liblognorm-2.0.5/src/lognorm.c:95: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 buf[8*1024];
data/liblognorm-2.0.5/src/lognorm.c:96: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 errbuf[1024];
data/liblognorm-2.0.5/src/lognorm.c:97: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 finalbuf[9*1024];
data/liblognorm-2.0.5/src/lognormalizer.c:365: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((fpDOT = fopen(optarg, "w")) == NULL) {
data/liblognorm-2.0.5/src/lognormalizer.c:377:22:  [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((fpStatsDOT = fopen(optarg, "w")) == NULL) {
data/liblognorm-2.0.5/src/lognormalizer.c:393:19:  [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((fpStats = fopen(optarg, "w")) == NULL) {
data/liblognorm-2.0.5/src/parser.c:1392:4:  [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(data->data_for_display, "char-to{", 8);
data/liblognorm-2.0.5/src/parser.c:1492: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((char*)org->lit+len, add->lit, add_len+1);
data/liblognorm-2.0.5/src/parser.c:2248: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(name, npb->str+iName, lenName);
data/liblognorm-2.0.5/src/parser.c:2427: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(name, npb->str+iName, lenName);
data/liblognorm-2.0.5/src/parser.c:2710:4:  [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(name, npb->str+iName, lenName);
data/liblognorm-2.0.5/src/parser.c:2938:4:  [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(name, npb->str+iName, lenName);
data/liblognorm-2.0.5/src/parser.c:2941:4:  [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(val, npb->str+iValue, lenValue);
data/liblognorm-2.0.5/src/parser.c:3157: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 perm_chars[256]; // TODO: make this bit-wise, so we need  only 32 bytes
data/liblognorm-2.0.5/src/pdag.c:584: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 indent[2048];
data/liblognorm-2.0.5/src/pdag.c:879: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(pdag->parsers+pdag->nparsers, parser, sizeof(ln_parser_t));
data/liblognorm-2.0.5/src/pdag.c:1002: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 indent[2048];
data/liblognorm-2.0.5/src/pdag.c:1043: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 indent[2048];
data/liblognorm-2.0.5/src/pdag.c:1084: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 buf[64];
data/liblognorm-2.0.5/src/pdag.c:1096: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 s_refcnt[16];
data/liblognorm-2.0.5/src/pdag.c:1278: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 hdr[128];
data/liblognorm-2.0.5/src/pdag.c:1408: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 hdr[16];
data/liblognorm-2.0.5/src/samp.c:62: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 name[MAX_FIELDNAME_LEN];
data/liblognorm-2.0.5/src/samp.c:633: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 typename[MAX_TYPENAME_LEN];
data/liblognorm-2.0.5/src/samp.c:945: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 buf[6];
data/liblognorm-2.0.5/src/samp.c:1007: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 buf[64*1024]; /**< max size of rule - TODO: make configurable */
data/liblognorm-2.0.5/src/samp.c:1059: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 buf[64];
data/liblognorm-2.0.5/src/samp.c:1096:13:  [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((repo = fopen(file, "r")) != NULL)
data/liblognorm-2.0.5/src/samp.c:1113:13:  [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((repo = fopen(fname, "r")) == NULL) {
data/liblognorm-2.0.5/src/v1_liblognorm.c:89:13:  [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((repo = fopen(file, "r")) == NULL) {
data/liblognorm-2.0.5/src/v1_parser.c:119: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 *argv[MAX_FIELD_ARGS];
data/liblognorm-2.0.5/src/v1_parser.c:2472: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(name, str+iName, lenName);
data/liblognorm-2.0.5/src/v1_parser.c:2652: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(name, str+iName, lenName);
data/liblognorm-2.0.5/src/v1_parser.c:2938:4:  [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(name, str+iName, lenName);
data/liblognorm-2.0.5/src/v1_parser.c:3165:4:  [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(name, str+iName, lenName);
data/liblognorm-2.0.5/src/v1_parser.c:3168:4:  [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(val, str+iValue, lenValue);
data/liblognorm-2.0.5/src/v1_ptree.c:132:3:  [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(tree->prefix.ptr, buf, tree->lenPrefix);
data/liblognorm-2.0.5/src/v1_ptree.c:135:3:  [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(tree->prefix.data, buf, tree->lenPrefix);
data/liblognorm-2.0.5/src/v1_ptree.c:272:3:  [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(tree->prefix.data, c+offs+1, newlen);
data/liblognorm-2.0.5/src/v1_ptree.c:415: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 indent[2048];
data/liblognorm-2.0.5/src/v1_ptree.c:466: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 buf[64];
data/liblognorm-2.0.5/src/v1_ptree.h:89:12:  [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.
		unsigned char data[16]; /**< fast lookup for small string */
data/liblognorm-2.0.5/src/v1_samp.c:797: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 buf[10*1024]; /**< max size of rule - TODO: make configurable */
data/liblognorm-2.0.5/compat/strndup.c:29: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).
	const size_t len = strlen(s);
data/liblognorm-2.0.5/src/annot.c:233:41:  [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).
		CHKN(tag = es_newStrFromCStr(tagCstr, strlen(tagCstr)));
data/liblognorm-2.0.5/src/enc_csv.c:76:17:  [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(buf); i++) {
data/liblognorm-2.0.5/src/enc_syslog.c:56:17:  [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(value); i++) {
data/liblognorm-2.0.5/src/enc_syslog.c:116: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).
	CHKR(es_addBuf(str, name, strlen(name)));
data/liblognorm-2.0.5/src/enc_syslog.c:171: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).
		CHKR(es_addBuf(str, (char*)tagCstr, strlen(tagCstr)));
data/liblognorm-2.0.5/src/enc_xml.c:76: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).
	for(i = 0 ; i < strlen(value) ; ++i) {
data/liblognorm-2.0.5/src/enc_xml.c:144: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).
	CHKR(es_addBuf(str, name, strlen(name)));
data/liblognorm-2.0.5/src/enc_xml.c:191: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).
		CHKR(es_addBuf(str, (char*)tagCstr, strlen(tagCstr)));
data/liblognorm-2.0.5/src/lognorm.c:41:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(buf, p, buflen);
data/liblognorm-2.0.5/src/lognormalizer.c:184:8:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		ch = fgetc(fp);
data/liblognorm-2.0.5/src/lognormalizer.c:228: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).
		ln_normalize(ctx, line, strlen(line), &json);
data/liblognorm-2.0.5/src/lognormalizer.c:405: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).
			encFmt = es_newStrFromCStr(optarg, strlen(optarg));
data/liblognorm-2.0.5/src/lognormalizer.c:456:45:  [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).
			mandatoryTag = es_newStrFromCStr(optarg, strlen(optarg));
data/liblognorm-2.0.5/src/parser.c:1269: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).
	data->len = strlen(data->toFind);
data/liblognorm-2.0.5/src/parser.c:1379: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).
	data->n_term_chars = strlen(data->term_chars);
data/liblognorm-2.0.5/src/parser.c:1487: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).
	const size_t len = strlen(org->lit);
data/liblognorm-2.0.5/src/parser.c:1488: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).
	const size_t add_len = strlen(add->lit);
data/liblognorm-2.0.5/src/parser.c:1551: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).
	data->n_term_chars = strlen(data->term_chars);
data/liblognorm-2.0.5/src/parser.c:3179: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).
	const size_t nchars = strlen(optval);
data/liblognorm-2.0.5/src/parser.c:3407:7:  [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(optval) != 1) {
data/liblognorm-2.0.5/src/parser.c:3416:7:  [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(optval) != 1) {
data/liblognorm-2.0.5/src/pdag.c:448: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).
	int len = (int) strlen(curr);
data/liblognorm-2.0.5/src/pdag.c:1105: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).
	es_addBuf(str, s_refcnt, strlen(s_refcnt));
data/liblognorm-2.0.5/src/pdag.c:1121: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).
		es_addBuf(str, parserName(prs->prsid), strlen(parserName(prs->prsid)));
data/liblognorm-2.0.5/src/pdag.c:1222: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).
	size_t i = strlen(str)-1,j=0;
data/liblognorm-2.0.5/src/pdag.c:1417:6:  [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(ln_DataForDisplayLiteral(dag->ctx,
data/liblognorm-2.0.5/src/pdag.c:1426:6:  [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(ln_DataForDisplayCharTo(dag->ctx,
data/liblognorm-2.0.5/src/pdag.c:1432:4:  [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(parserName(prs->prsid)) );
data/liblognorm-2.0.5/src/pdag.c:1500: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).
		add_str_reversed(npb, val, strlen(val));
data/liblognorm-2.0.5/src/pdag.c:1506:4:  [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(parserName(prs->prsid)) );
data/liblognorm-2.0.5/src/pdag.c:1511:37:  [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).
			add_str_reversed(npb, prs->name, strlen(prs->name));
data/liblognorm-2.0.5/src/samp.c:838: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 lenfname = strlen(fname);
data/liblognorm-2.0.5/src/samp.c:916:7:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		c = fgetc(repo);
data/liblognorm-2.0.5/src/samp.c:947:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	int read;
data/liblognorm-2.0.5/src/samp.c:968:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if(read != 5)
data/liblognorm-2.0.5/src/samp.c:1108:33:  [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).
	len = asprintf(&fname, (rb_lib[strlen(rb_lib)-1] == '/') ? "%s%s" : "%s/%s", rb_lib, file);
data/liblognorm-2.0.5/src/v1_liblognorm.c:67: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).
	if (ln_v1_processSamp(ctx, buf, strlen(buf)) == NULL) {
data/liblognorm-2.0.5/src/v1_parser.c:179:32:  [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).
		str = es_newStrFromCStr(arg, strlen(arg));
data/liblognorm-2.0.5/src/v1_parser.c:1160:84:  [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).
	load_generated_parser_samples(ctx, field_descr, field_descr_len, remaining_field, strlen(remaining_field));
data/liblognorm-2.0.5/src/v1_parser.c:1179: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).
	CHKR(es_addBuf(&descr, field_prefix, strlen(field_prefix)));
data/liblognorm-2.0.5/src/v1_parser.c:1209:47:  [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).
	CHKN(pData->tok_str = es_newStrFromCStr(tok, strlen(tok)));
data/liblognorm-2.0.5/src/v1_parser.c:1212: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).
	const int field_descr_len = strlen(field_descr);
data/liblognorm-2.0.5/src/v1_parser.c:1327:3:  [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(consume_grp_str) == 0) return consume_group_parse_error;
data/liblognorm-2.0.5/src/v1_parser.c:1329:3:  [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(return_grp_str) == 0) return return_group_parse_error;
data/liblognorm-2.0.5/src/v1_parser.c:1333: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).
	if (errno != 0 || strlen(tmp) != 0) return consume_group_parse_error;
data/liblognorm-2.0.5/src/v1_parser.c:1336: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).
	if (errno != 0 || strlen(tmp) != 0) return return_group_parse_error;
data/liblognorm-2.0.5/src/v1_parser.c:1534:75:  [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).
	CHKN(pData->ctx = generate_context_with_field_as_prefix(ctx, field_type, strlen(field_type)));
data/liblognorm-2.0.5/src/v1_parser.c:1692: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).
	pData->suffix_lengths[i++] = strlen(tok);
data/liblognorm-2.0.5/src/v1_parser.c:1696:75:  [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).
	CHKN(pData->ctx = generate_context_with_field_as_prefix(ctx, field_type, strlen(field_type)));
data/liblognorm-2.0.5/src/v1_parser.c:1760:63:  [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).
	CHKN(unnamed_suffix_args = es_newStrFromCStr(remaining_args, strlen(remaining_args)));
data/liblognorm-2.0.5/src/v1_parser.h:46:49:  [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).
int ln_parseRFC5424Date(const char *str, size_t strlen, size_t *offs, const ln_fieldList_t *node, size_t *parsed,
data/liblognorm-2.0.5/src/v1_parser.h:52:49:  [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).
int ln_parseRFC3164Date(const char *str, size_t strlen, size_t *offs, const ln_fieldList_t *node, size_t *parsed,
data/liblognorm-2.0.5/src/v1_parser.h:58:44:  [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).
int ln_parseNumber(const char *str, size_t strlen, size_t *offs, const ln_fieldList_t *node, size_t *parsed,
data/liblognorm-2.0.5/src/v1_parser.h:64:43:  [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).
int ln_parseFloat(const char *str, size_t strlen, size_t *offs, const ln_fieldList_t *node, size_t *parsed,
data/liblognorm-2.0.5/src/v1_parser.h:70:47:  [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).
int ln_parseHexNumber(const char *str, size_t strlen, size_t *offs, const ln_fieldList_t *node, size_t *parsed,
data/liblognorm-2.0.5/src/v1_parser.h:77:53:  [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).
int ln_parseKernelTimestamp(const char *str, size_t strlen, size_t *offs, const ln_fieldList_t *node, size_t *parsed,
data/liblognorm-2.0.5/src/v1_parser.h:83: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).
int ln_parseWhitespace(const char *str, size_t strlen, size_t *offs, const ln_fieldList_t *node, size_t *parsed,
data/liblognorm-2.0.5/src/v1_parser.h:90: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).
int ln_parseWord(const char *str, size_t strlen, size_t *offs, const ln_fieldList_t *node, size_t *parsed,
data/liblognorm-2.0.5/src/v1_parser.h:97:46:  [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).
int ln_parseStringTo(const char *str, size_t strlen, size_t *offs, const ln_fieldList_t *node, size_t *parsed,
data/liblognorm-2.0.5/src/v1_parser.h:103:43:  [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).
int ln_parseAlpha(const char *str, size_t strlen, size_t *offs, const ln_fieldList_t *node, size_t *parsed,
data/liblognorm-2.0.5/src/v1_parser.h:110:44:  [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).
int ln_parseCharTo(const char *str, size_t strlen, size_t *offs, const ln_fieldList_t *node, size_t *parsed,
data/liblognorm-2.0.5/src/v1_parser.h:116:51:  [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).
int ln_parseCharSeparated(const char *str, size_t strlen, size_t *offs, const ln_fieldList_t *node, size_t *parsed,
data/liblognorm-2.0.5/src/v1_parser.h:123: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).
int ln_parseRest(const char *str, size_t strlen, size_t *offs, const ln_fieldList_t *node, size_t *parsed,
data/liblognorm-2.0.5/src/v1_parser.h:129:52:  [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).
int ln_parseOpQuotedString(const char *str, size_t strlen, size_t *offs, const ln_fieldList_t *node,
data/liblognorm-2.0.5/src/v1_parser.h:135:50:  [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).
int ln_parseQuotedString(const char *str, size_t strlen, size_t *offs, const ln_fieldList_t *node, size_t *parsed,
data/liblognorm-2.0.5/src/v1_parser.h:141:45:  [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).
int ln_parseISODate(const char *str, size_t strlen, size_t *offs, const ln_fieldList_t *node, size_t *parsed,
data/liblognorm-2.0.5/src/v1_parser.h:148:46:  [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).
int ln_parseTime12hr(const char *str, size_t strlen, size_t *offs, const ln_fieldList_t *node, size_t *parsed,
data/liblognorm-2.0.5/src/v1_parser.h:154:46:  [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).
int ln_parseTime24hr(const char *str, size_t strlen, size_t *offs, const ln_fieldList_t *node, size_t *parsed,
data/liblognorm-2.0.5/src/v1_parser.h:160:46:  [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).
int ln_parseDuration(const char *str, size_t strlen, size_t *offs, const ln_fieldList_t *node, size_t *parsed,
data/liblognorm-2.0.5/src/v1_parser.h:166: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).
int ln_parseIPv4(const char *str, size_t strlen, size_t *offs, const ln_fieldList_t *node, size_t *parsed,
data/liblognorm-2.0.5/src/v1_parser.h:172: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).
int ln_parseIPv6(const char *str, size_t strlen, size_t *offs, const ln_fieldList_t *node, size_t *parsed,
data/liblognorm-2.0.5/src/v1_parser.h:178: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).
int ln_parseJSON(const char *str, size_t strlen, size_t *offs, const ln_fieldList_t *node, size_t *parsed,
data/liblognorm-2.0.5/src/v1_parser.h:184:47:  [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).
int ln_parseCEESyslog(const char *str, size_t strlen, size_t *offs, const ln_fieldList_t *node, size_t *parsed,
data/liblognorm-2.0.5/src/v1_parser.h:190: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).
int ln_parsev2IPTables(const char *str, size_t strlen, size_t *offs, const ln_fieldList_t *node, size_t *parsed,
data/liblognorm-2.0.5/src/v1_parser.h:196:56:  [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).
int ln_parseCiscoInterfaceSpec(const char *str, size_t strlen, size_t *offs, const ln_fieldList_t *node,
data/liblognorm-2.0.5/src/v1_parser.h:202:43:  [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).
int ln_parseMAC48(const char *str, size_t strlen, size_t *offs, const ln_fieldList_t *node, size_t *parsed,
data/liblognorm-2.0.5/src/v1_parser.h:208:41:  [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).
int ln_parseCEF(const char *str, size_t strlen, size_t *offs, const ln_fieldList_t *node, size_t *parsed,
data/liblognorm-2.0.5/src/v1_parser.h:214:51:  [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).
int ln_parseCheckpointLEA(const char *str, size_t strlen, size_t *offs, const ln_fieldList_t *node, size_t *parsed,
data/liblognorm-2.0.5/src/v1_parser.h:220:47:  [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).
int ln_parseNameValue(const char *str, size_t strlen, size_t *offs, const ln_fieldList_t *node, size_t *parsed,
data/liblognorm-2.0.5/src/v1_parser.h:226:47:  [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).
int ln_parseTokenized(const char *str, size_t strlen, size_t *offs, const ln_fieldList_t *node, size_t *parsed,
data/liblognorm-2.0.5/src/v1_parser.h:236:43:  [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).
int ln_parseRegex(const char *str, size_t strlen, size_t *offs, const ln_fieldList_t *node, size_t *parsed,
data/liblognorm-2.0.5/src/v1_parser.h:246:47:  [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).
int ln_parseRecursive(const char *str, size_t strlen, size_t *offs, const ln_fieldList_t *node, size_t *parsed,
data/liblognorm-2.0.5/src/v1_parser.h:256:47:  [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).
int ln_parseInterpret(const char *str, size_t strlen, size_t *offs, const ln_fieldList_t *node,
data/liblognorm-2.0.5/src/v1_parser.h:265:46:  [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).
int ln_parseSuffixed(const char *str, size_t strlen, size_t *offs, const ln_fieldList_t *node, size_t *parsed,
data/liblognorm-2.0.5/src/v1_samp.c:803:11:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		int c = fgetc(repo);

ANALYSIS SUMMARY:

Hits = 141
Lines analyzed = 15196 in approximately 0.46 seconds (32753 lines/second)
Physical Source Lines of Code (SLOC) = 10235
Hits@level = [0]  92 [1]  86 [2]  49 [3]   2 [4]   4 [5]   0
Hits@level+ = [0+] 233 [1+] 141 [2+]  55 [3+]   6 [4+]   4 [5+]   0
Hits/KSLOC@level+ = [0+] 22.765 [1+] 13.7763 [2+] 5.37372 [3+] 0.586224 [4+] 0.390816 [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.