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/gnuais-0.3.3/src/ais.c
Examining data/gnuais-0.3.3/src/ais.h
Examining data/gnuais-0.3.3/src/cache.c
Examining data/gnuais-0.3.3/src/cache.h
Examining data/gnuais-0.3.3/src/cfg.c
Examining data/gnuais-0.3.3/src/cfg.h
Examining data/gnuais-0.3.3/src/cfgfile.h
Examining data/gnuais-0.3.3/src/crc32.c
Examining data/gnuais-0.3.3/src/crc32.h
Examining data/gnuais-0.3.3/src/filter.c
Examining data/gnuais-0.3.3/src/filter.h
Examining data/gnuais-0.3.3/src/gui/gui.c
Examining data/gnuais-0.3.3/src/gui/osd-utils.h
Examining data/gnuais-0.3.3/src/gui/osm-gps-map-ais.c
Examining data/gnuais-0.3.3/src/gui/osm-gps-map-ais.h
Examining data/gnuais-0.3.3/src/gui/private.h
Examining data/gnuais-0.3.3/src/hlog.c
Examining data/gnuais-0.3.3/src/hlog.h
Examining data/gnuais-0.3.3/src/hmalloc.c
Examining data/gnuais-0.3.3/src/hmalloc.h
Examining data/gnuais-0.3.3/src/input.c
Examining data/gnuais-0.3.3/src/input.h
Examining data/gnuais-0.3.3/src/ipc.c
Examining data/gnuais-0.3.3/src/ipc.h
Examining data/gnuais-0.3.3/src/out_json.c
Examining data/gnuais-0.3.3/src/out_json.h
Examining data/gnuais-0.3.3/src/out_mysql.c
Examining data/gnuais-0.3.3/src/protodec.c
Examining data/gnuais-0.3.3/src/protodec.h
Examining data/gnuais-0.3.3/src/pulseaudio.c
Examining data/gnuais-0.3.3/src/pulseaudio.h
Examining data/gnuais-0.3.3/src/range.c
Examining data/gnuais-0.3.3/src/range.h
Examining data/gnuais-0.3.3/src/receiver.c
Examining data/gnuais-0.3.3/src/receiver.h
Examining data/gnuais-0.3.3/src/rwlock.c
Examining data/gnuais-0.3.3/src/rwlock.h
Examining data/gnuais-0.3.3/src/serial.c
Examining data/gnuais-0.3.3/src/serial.h
Examining data/gnuais-0.3.3/src/splay.c
Examining data/gnuais-0.3.3/src/splay.h
Examining data/gnuais-0.3.3/src/spsymbol.c
Examining data/gnuais-0.3.3/src/cfgfile.c
Examining data/gnuais-0.3.3/src/filter-i386.h
Examining data/gnuais-0.3.3/src/out_mysql.h

FINAL RESULTS:

data/gnuais-0.3.3/src/cfg.c:382:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(s, "%s/%s.pid", logdir, logname);
data/gnuais-0.3.3/src/hlog.c:98:2:  [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.
	vsnprintf(buf, LOG_LEN, fmt, args);
data/gnuais-0.3.3/src/hlog.c:108:2:  [4] (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).
	strcpy(ret + len, buf);
data/gnuais-0.3.3/src/hlog.c:153:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(log_fname, "%s/%s", log_dir, log_basename);
data/gnuais-0.3.3/src/hlog.c:228:2:  [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.
	vsnprintf(s, LOG_LEN, fmt, args);
data/gnuais-0.3.3/src/hlog.c:283:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(accesslog_fname, "%s/%s", accesslog_dir, accesslog_basename);
data/gnuais-0.3.3/src/hlog.c:333:2:  [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.
	vsnprintf(s, LOG_LEN, fmt, args);
data/gnuais-0.3.3/src/hmalloc.c:83:2:  [4] (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).
	strcpy(p, s);
data/gnuais-0.3.3/src/cfg.c:431:14:  [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 ((s = getopt(argc, argv, "c:fn:r:e:o:l:s:?h")) != -1) {
data/gnuais-0.3.3/src/cfgfile.c:352:35:  [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.
		conf_home_folder_name = hstrdup(getenv("HOME"));	
data/gnuais-0.3.3/src/gui/gui.c:476:2:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	srand(time(0));
data/gnuais-0.3.3/src/ais.c:174: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 ((sound_in_fd = fopen(sound_in_file, "r")) == NULL) {
data/gnuais-0.3.3/src/ais.c:189:23:  [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 ((sound_out_fd = fopen(sound_out_file, "w")) == NULL) {
data/gnuais-0.3.3/src/cfg.c:164:8:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			i = atoi(np);
data/gnuais-0.3.3/src/cfg.c:179:8:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		t += atoi(np);
data/gnuais-0.3.3/src/cfg.c:210:6:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	i = atoi(argv[1]);
data/gnuais-0.3.3/src/cfgfile.c:45: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[4096];
data/gnuais-0.3.3/src/cfgfile.c:49:12:  [2] (misc) open:
  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).
	fd_from = open(from, O_RDONLY);
data/gnuais-0.3.3/src/cfgfile.c:53:10:  [2] (misc) open:
  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).
	fd_to = open(to, O_WRONLY | O_CREAT | O_EXCL, 0666);
data/gnuais-0.3.3/src/cfgfile.c:148:10:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	*dest = atoi(argv[1]);
data/gnuais-0.3.3/src/cfgfile.c:296: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.
	static char s[CFGLINE_LEN];
data/gnuais-0.3.3/src/cfgfile.c:320: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[256];
data/gnuais-0.3.3/src/cfgfile.c:345: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 line[CFGLINE_LEN];
data/gnuais-0.3.3/src/cfgfile.c:350:7:  [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).
	fp = fopen(f, "r");
data/gnuais-0.3.3/src/cfgfile.c:358: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).
		fp = fopen(conf_home_folder,"r");
data/gnuais-0.3.3/src/cfgfile.c:365:15:  [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).
			tmp_file = fopen("/etc/gnuais.conf","r");	
data/gnuais-0.3.3/src/cfgfile.c:368:16:  [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).
				tmp_file = fopen("/usr/local/share/doc/gnuais/gnuais.conf-example","r");	
data/gnuais-0.3.3/src/cfgfile.c:370: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).
					tmp_file = fopen("/usr/share/doc/gnuais/examples/gnuais.conf-example","r");	
data/gnuais-0.3.3/src/cfgfile.c:396:10:  [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).
				fp = fopen(conf_home_folder,"r");
data/gnuais-0.3.3/src/filter.c:65: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(f->taps, taps, len * sizeof(float));
data/gnuais-0.3.3/src/filter.c:99: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(f->buffer, 
data/gnuais-0.3.3/src/filter.c:130: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(buffer, 
data/gnuais-0.3.3/src/gui/gui.c:79:1:  [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 mapfilename[100] = "map.png";
data/gnuais-0.3.3/src/gui/gui.c:152: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[21];
data/gnuais-0.3.3/src/gui/gui.c:162: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 destination[21];
data/gnuais-0.3.3/src/gui/gui.c:191: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.
	static char r_buffer[600];
data/gnuais-0.3.3/src/gui/gui.c:251:11:  [2] (misc) open:
  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).
	int fd = open(dev, O_RDWR | O_NOCTTY | O_NDELAY);
data/gnuais-0.3.3/src/gui/gui.c:344: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 aisline[500];
data/gnuais-0.3.3/src/gui/gui.c:354: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 nmeabuffer[256];
data/gnuais-0.3.3/src/hlog.c:93: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[LOG_LEN];
data/gnuais-0.3.3/src/hlog.c:155:14:  [2] (misc) open:
  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).
		log_file = open(log_fname, O_WRONLY|O_CREAT|O_APPEND, S_IRUSR|S_IWUSR|S_IRGRP);
data/gnuais-0.3.3/src/hlog.c:213: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[LOG_LEN];
data/gnuais-0.3.3/src/hlog.c:214: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 wb[LOG_LEN];
data/gnuais-0.3.3/src/hlog.c:285:19:  [2] (misc) open:
  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).
	accesslog_file = open(accesslog_fname, O_WRONLY|O_CREAT|O_APPEND, S_IRUSR|S_IWUSR|S_IRGRP);
data/gnuais-0.3.3/src/hlog.c:326: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[LOG_LEN], wb[LOG_LEN];
data/gnuais-0.3.3/src/hlog.c:368:12:  [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 (!(f = fopen(name, "w"))) {
data/gnuais-0.3.3/src/out_json.c:220: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 tbuf[TBUF_LEN];
data/gnuais-0.3.3/src/out_mysql.c:100: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 q[MAX_SQL_LEN];
data/gnuais-0.3.3/src/out_mysql.c:177: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 ins[MAX_SQL_LEN], upd[MAX_SQL_LEN];
data/gnuais-0.3.3/src/out_mysql.c:201: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 ins[MAX_SQL_LEN], upd[MAX_SQL_LEN];
data/gnuais-0.3.3/src/out_mysql.c:221: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 ins[MAX_SQL_LEN], upd[MAX_SQL_LEN];
data/gnuais-0.3.3/src/out_mysql.c:241: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 ins[MAX_SQL_LEN], upd[MAX_SQL_LEN];
data/gnuais-0.3.3/src/out_mysql.c:261: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 ins[MAX_SQL_LEN], upd[MAX_SQL_LEN];
data/gnuais-0.3.3/src/out_mysql.c:281: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 q[MAX_SQL_LEN];
data/gnuais-0.3.3/src/protodec.c:449: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 callsign[7];
data/gnuais-0.3.3/src/protodec.c:450: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[21];
data/gnuais-0.3.3/src/protodec.c:451: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 destination[21];
data/gnuais-0.3.3/src/protodec.c:639: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[21];
data/gnuais-0.3.3/src/protodec.c:644: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 destination[21] = "CLASS B";
data/gnuais-0.3.3/src/protodec.c:710: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[21];
data/gnuais-0.3.3/src/protodec.c:711: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 callsign[7];
data/gnuais-0.3.3/src/protodec.c:716: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.
	const char destination[21] = "CLASS B";
data/gnuais-0.3.3/src/protodec.c:787: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 nchk[NCHK_LEN];
data/gnuais-0.3.3/src/serial.c:61:14:  [2] (misc) open:
  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).
	state->fd = open(serial_port, O_RDWR | O_NOCTTY | O_NDELAY);
data/gnuais-0.3.3/src/splay.c:284: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.
	static char buf[ 128 ];
data/gnuais-0.3.3/src/splay.c:296:2:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	sprintf(buf, "f(%lld %4.2f) i(%lld %4.2f) s(%lld %4.2f)",
data/gnuais-0.3.3/src/spsymbol.c:36: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.
	const char name[1];
data/gnuais-0.3.3/src/spsymbol.c:113: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((void*)se->name, s, slen);
data/gnuais-0.3.3/src/cfg.c:290: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).
	if (strlen(s) > 12)
data/gnuais-0.3.3/src/cfg.c:292: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).
	if (strlen(s) < 3)
data/gnuais-0.3.3/src/cfg.c:381: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).
		s = hmalloc(strlen(logdir) + 1 + strlen(logname) + 3 + 2);
data/gnuais-0.3.3/src/cfg.c:381:36:  [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).
		s = hmalloc(strlen(logdir) + 1 + strlen(logname) + 3 + 2);
data/gnuais-0.3.3/src/cfgfile.c:57:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while (nread = read(fd_from, buf, sizeof buf), nread > 0)
data/gnuais-0.3.3/src/cfgfile.c:302:3:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
		strncat(s, argv[i], sizeof(s)-strlen(s)-1);
data/gnuais-0.3.3/src/cfgfile.c:302: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).
		strncat(s, argv[i], sizeof(s)-strlen(s)-1);
data/gnuais-0.3.3/src/cfgfile.c:303:3:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is low because the source is a
  constant character.
		strncat(s, " ", sizeof(s)-strlen(s)-1);
data/gnuais-0.3.3/src/cfgfile.c:303:29:  [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).
		strncat(s, " ", sizeof(s)-strlen(s)-1);
data/gnuais-0.3.3/src/cfgfile.c:306:11:  [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 ((i = strlen(s)) > 0)
data/gnuais-0.3.3/src/cfgfile.c:326: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).
		if (strncasecmp(cmdp->name, argv[0], strlen(argv[0])) == 0)
data/gnuais-0.3.3/src/gui/gui.c:193: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).
	DBG(printf("nmealength %d\n", strlen(nmea) * 6));
data/gnuais-0.3.3/src/gui/gui.c:195: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).
	for (i = 0; i < (strlen(nmea) * 6); i++) {
data/gnuais-0.3.3/src/gui/gui.c:375:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while ((nbytes = read(socket_fd, nmeabuffer, 256)) != 0) {
data/gnuais-0.3.3/src/hlog.c:103: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).
		len = strlen(s);
data/gnuais-0.3.3/src/hlog.c:107:26:  [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).
	ret = hrealloc(s, len + strlen(buf) + 1);
data/gnuais-0.3.3/src/hlog.c:152: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).
		log_fname = hmalloc(strlen(log_dir) + strlen(log_basename) + 2);
data/gnuais-0.3.3/src/hlog.c:152: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).
		log_fname = hmalloc(strlen(log_dir) + strlen(log_basename) + 2);
data/gnuais-0.3.3/src/hlog.c:282: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).
	accesslog_fname = hmalloc(strlen(accesslog_dir) + strlen(accesslog_basename) + 2);
data/gnuais-0.3.3/src/hlog.c:282: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).
	accesslog_fname = hmalloc(strlen(accesslog_dir) + strlen(accesslog_basename) + 2);
data/gnuais-0.3.3/src/hmalloc.c:82: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).
	p = hmalloc(strlen(s)+1);
data/gnuais-0.3.3/src/rwlock.c:54:39:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    status = pthread_cond_init (&rwl->read, NULL);
data/gnuais-0.3.3/src/rwlock.c:63:37:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        pthread_cond_destroy (&rwl->read);
data/gnuais-0.3.3/src/rwlock.c:107:43:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    status1 = pthread_cond_destroy (&rwl->read);
data/gnuais-0.3.3/src/rwlock.c:143:47:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            status = pthread_cond_wait (&rwl->read, &rwl->mutex);
data/gnuais-0.3.3/src/rwlock.c:275:48:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        status = pthread_cond_broadcast (&rwl->read);
data/gnuais-0.3.3/src/rwlock.h:49:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    pthread_cond_t      read;           /* wait for read */
data/gnuais-0.3.3/src/spsymbol.c:201: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).
	symbol_free_db_mem(s, strlen(s), spt);
data/gnuais-0.3.3/src/spsymbol.c:219: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).
	return symbol_lookup_db_mem(s, strlen(s), spt);
data/gnuais-0.3.3/src/spsymbol.c:235:26:  [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 symbol_db_mem(s, strlen(s), spt);

ANALYSIS SUMMARY:

Hits = 98
Lines analyzed = 8981 in approximately 0.28 seconds (31651 lines/second)
Physical Source Lines of Code (SLOC) = 5788
Hits@level = [0]  90 [1]  30 [2]  57 [3]   3 [4]   8 [5]   0
Hits@level+ = [0+] 188 [1+]  98 [2+]  68 [3+]  11 [4+]   8 [5+]   0
Hits/KSLOC@level+ = [0+] 32.481 [1+] 16.9316 [2+] 11.7484 [3+] 1.90048 [4+] 1.38217 [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.