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/libmpdclient-2.19/include/mpd/async.h
Examining data/libmpdclient-2.19/include/mpd/audio_format.h
Examining data/libmpdclient-2.19/include/mpd/capabilities.h
Examining data/libmpdclient-2.19/include/mpd/client.h
Examining data/libmpdclient-2.19/include/mpd/compiler.h
Examining data/libmpdclient-2.19/include/mpd/connection.h
Examining data/libmpdclient-2.19/include/mpd/database.h
Examining data/libmpdclient-2.19/include/mpd/directory.h
Examining data/libmpdclient-2.19/include/mpd/entity.h
Examining data/libmpdclient-2.19/include/mpd/error.h
Examining data/libmpdclient-2.19/include/mpd/fingerprint.h
Examining data/libmpdclient-2.19/include/mpd/idle.h
Examining data/libmpdclient-2.19/include/mpd/list.h
Examining data/libmpdclient-2.19/include/mpd/message.h
Examining data/libmpdclient-2.19/include/mpd/mixer.h
Examining data/libmpdclient-2.19/include/mpd/mount.h
Examining data/libmpdclient-2.19/include/mpd/neighbor.h
Examining data/libmpdclient-2.19/include/mpd/output.h
Examining data/libmpdclient-2.19/include/mpd/pair.h
Examining data/libmpdclient-2.19/include/mpd/parser.h
Examining data/libmpdclient-2.19/include/mpd/partition.h
Examining data/libmpdclient-2.19/include/mpd/password.h
Examining data/libmpdclient-2.19/include/mpd/player.h
Examining data/libmpdclient-2.19/include/mpd/playlist.h
Examining data/libmpdclient-2.19/include/mpd/protocol.h
Examining data/libmpdclient-2.19/include/mpd/queue.h
Examining data/libmpdclient-2.19/include/mpd/recv.h
Examining data/libmpdclient-2.19/include/mpd/replay_gain.h
Examining data/libmpdclient-2.19/include/mpd/response.h
Examining data/libmpdclient-2.19/include/mpd/search.h
Examining data/libmpdclient-2.19/include/mpd/send.h
Examining data/libmpdclient-2.19/include/mpd/settings.h
Examining data/libmpdclient-2.19/include/mpd/socket.h
Examining data/libmpdclient-2.19/include/mpd/song.h
Examining data/libmpdclient-2.19/include/mpd/stats.h
Examining data/libmpdclient-2.19/include/mpd/status.h
Examining data/libmpdclient-2.19/include/mpd/sticker.h
Examining data/libmpdclient-2.19/include/mpd/tag.h
Examining data/libmpdclient-2.19/src/async.c
Examining data/libmpdclient-2.19/src/audio_format.c
Examining data/libmpdclient-2.19/src/buffer.h
Examining data/libmpdclient-2.19/src/capabilities.c
Examining data/libmpdclient-2.19/src/cmessage.c
Examining data/libmpdclient-2.19/src/cmount.c
Examining data/libmpdclient-2.19/src/cneighbor.c
Examining data/libmpdclient-2.19/src/connection.c
Examining data/libmpdclient-2.19/src/coutput.c
Examining data/libmpdclient-2.19/src/cpartition.c
Examining data/libmpdclient-2.19/src/cplaylist.c
Examining data/libmpdclient-2.19/src/cstats.c
Examining data/libmpdclient-2.19/src/cstatus.c
Examining data/libmpdclient-2.19/src/database.c
Examining data/libmpdclient-2.19/src/directory.c
Examining data/libmpdclient-2.19/src/entity.c
Examining data/libmpdclient-2.19/src/error.c
Examining data/libmpdclient-2.19/src/example.c
Examining data/libmpdclient-2.19/src/fd_util.c
Examining data/libmpdclient-2.19/src/fd_util.h
Examining data/libmpdclient-2.19/src/fingerprint.c
Examining data/libmpdclient-2.19/src/iaf.h
Examining data/libmpdclient-2.19/src/iasync.h
Examining data/libmpdclient-2.19/src/idle.c
Examining data/libmpdclient-2.19/src/ierror.c
Examining data/libmpdclient-2.19/src/ierror.h
Examining data/libmpdclient-2.19/src/internal.h
Examining data/libmpdclient-2.19/src/isend.h
Examining data/libmpdclient-2.19/src/iso8601.c
Examining data/libmpdclient-2.19/src/iso8601.h
Examining data/libmpdclient-2.19/src/kvlist.c
Examining data/libmpdclient-2.19/src/kvlist.h
Examining data/libmpdclient-2.19/src/list.c
Examining data/libmpdclient-2.19/src/message.c
Examining data/libmpdclient-2.19/src/mixer.c
Examining data/libmpdclient-2.19/src/mount.c
Examining data/libmpdclient-2.19/src/neighbor.c
Examining data/libmpdclient-2.19/src/output.c
Examining data/libmpdclient-2.19/src/parser.c
Examining data/libmpdclient-2.19/src/partition.c
Examining data/libmpdclient-2.19/src/password.c
Examining data/libmpdclient-2.19/src/player.c
Examining data/libmpdclient-2.19/src/playlist.c
Examining data/libmpdclient-2.19/src/queue.c
Examining data/libmpdclient-2.19/src/quote.c
Examining data/libmpdclient-2.19/src/quote.h
Examining data/libmpdclient-2.19/src/rdirectory.c
Examining data/libmpdclient-2.19/src/recv.c
Examining data/libmpdclient-2.19/src/replay_gain.c
Examining data/libmpdclient-2.19/src/resolver.c
Examining data/libmpdclient-2.19/src/resolver.h
Examining data/libmpdclient-2.19/src/response.c
Examining data/libmpdclient-2.19/src/rplaylist.c
Examining data/libmpdclient-2.19/src/run.c
Examining data/libmpdclient-2.19/src/run.h
Examining data/libmpdclient-2.19/src/search.c
Examining data/libmpdclient-2.19/src/send.c
Examining data/libmpdclient-2.19/src/settings.c
Examining data/libmpdclient-2.19/src/socket.c
Examining data/libmpdclient-2.19/src/socket.h
Examining data/libmpdclient-2.19/src/song.c
Examining data/libmpdclient-2.19/src/stats.c
Examining data/libmpdclient-2.19/src/status.c
Examining data/libmpdclient-2.19/src/sticker.c
Examining data/libmpdclient-2.19/src/sync.c
Examining data/libmpdclient-2.19/src/sync.h
Examining data/libmpdclient-2.19/src/tag.c
Examining data/libmpdclient-2.19/src/uri.h
Examining data/libmpdclient-2.19/test/capture.c
Examining data/libmpdclient-2.19/test/capture.h
Examining data/libmpdclient-2.19/test/main.c
Examining data/libmpdclient-2.19/test/t_commands.c
Examining data/libmpdclient-2.19/test/t_iso8601.c

FINAL RESULTS:

data/libmpdclient-2.19/include/mpd/compiler.h:49:47:  [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.
#define mpd_printf(a,b) __attribute__((format(printf, a, b)))
data/libmpdclient-2.19/src/async.c:119:22:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	return async->error.system;
data/libmpdclient-2.19/src/capabilities.c:76:2:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
	strcat(buffer, sub_command);
data/libmpdclient-2.19/src/error.c:67:27:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	return connection->error.system;
data/libmpdclient-2.19/src/idle.c:162:4:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
			strcat(buffer, idle_names[i]);
data/libmpdclient-2.19/src/ierror.c:87: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(buffer, sizeof(buffer), fmt, ap);
data/libmpdclient-2.19/src/ierror.c:148:23:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
		dest->system = src->system;
data/libmpdclient-2.19/src/ierror.h:66:6:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	int system;
data/libmpdclient-2.19/src/search.c:210:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(dest, " %s \"%s\"", name, arg);
data/libmpdclient-2.19/src/search.c:296:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(dest, " \"%s\"", arg);
data/libmpdclient-2.19/src/settings.c:105:28:  [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 *host_getenv = getenv("MPD_HOST");
data/libmpdclient-2.19/src/settings.c:133:26:  [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 *env_port = getenv("MPD_PORT");
data/libmpdclient-2.19/src/settings.c:144:31:  [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 *timeout_string = getenv("MPD_TIMEOUT");
data/libmpdclient-2.19/src/status.c:53:7:  [3] (random) random:
  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.
	bool random;
data/libmpdclient-2.19/src/status.c:311:17:  [3] (random) random:
  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.
	return status->random;
data/libmpdclient-2.19/src/async.c:317: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(dest, command, length);
data/libmpdclient-2.19/src/async.c:407: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(dest, mpd_buffer_read(&async->input), length);
data/libmpdclient-2.19/src/buffer.h:48:11:  [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[4096];
data/libmpdclient-2.19/src/capabilities.c:75: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 buffer[1024] = "tagtypes ";
data/libmpdclient-2.19/src/capabilities.c:92: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(buffer + length, t, t_length);
data/libmpdclient-2.19/src/cplaylist.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 from_string[UNSIGNEDLEN], to_string[UNSIGNEDLEN];
data/libmpdclient-2.19/src/cplaylist.c:117: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 pos_string[UNSIGNEDLEN];
data/libmpdclient-2.19/src/database.c:89:9:  [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).
		ret = atoi(pair->value);
data/libmpdclient-2.19/src/example.c:73: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 offset_s[32];
data/libmpdclient-2.19/src/example.c:341: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 buffer[8192];
data/libmpdclient-2.19/src/idle.c:151: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 buffer[128] = "idle";
data/libmpdclient-2.19/src/ierror.c:71: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(error->message, message, length);
data/libmpdclient-2.19/src/ierror.c:80: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 buffer[1024];
data/libmpdclient-2.19/src/ierror.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 buffer[1024];
data/libmpdclient-2.19/src/kvlist.c:79: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(p, s, length);
data/libmpdclient-2.19/src/output.c:65:15:  [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).
	output->id = atoi(pair->value);
data/libmpdclient-2.19/src/output.c:85:21:  [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).
		output->enabled = atoi(pair->value) != 0;
data/libmpdclient-2.19/src/player.c:224: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 ts[32];
data/libmpdclient-2.19/src/queue.c:148:16:  [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).
	*position_r = atoi(pair->value);
data/libmpdclient-2.19/src/queue.c:165: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).
	*id_r = atoi(pair->value);
data/libmpdclient-2.19/src/queue.c:206: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).
		id = atoi(pair->value);
data/libmpdclient-2.19/src/resolver.c:92: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(resolver->saun.sun_path, host, path_length);
data/libmpdclient-2.19/src/resolver.c:113: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 service[20];
data/libmpdclient-2.19/src/resolver.c:149: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((char *)&resolver->sin.sin_addr.s_addr,
data/libmpdclient-2.19/src/search.c:263: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 buffer[64];
data/libmpdclient-2.19/src/send.c:146: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 arg_string[INTLEN];
data/libmpdclient-2.19/src/send.c:156: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 arg1_string[INTLEN], arg2_string[INTLEN];
data/libmpdclient-2.19/src/send.c:168: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 arg1_string[INTLEN], arg2_string[INTLEN], arg3_string[INTLEN];
data/libmpdclient-2.19/src/send.c:181: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 arg_string[FLOATLEN];
data/libmpdclient-2.19/src/send.c:191: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 arg1_string[INTLEN], arg2_string[FLOATLEN];
data/libmpdclient-2.19/src/send.c:203: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 arg1_string[INTLEN];
data/libmpdclient-2.19/src/send.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 arg1_string[INTLEN];
data/libmpdclient-2.19/src/send.c:225: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 arg2_string[INTLEN];
data/libmpdclient-2.19/src/send.c:236: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 arg_string[INTLEN*2+1];
data/libmpdclient-2.19/src/send.c:247: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 range_string[INTLEN * 2 + 1];
data/libmpdclient-2.19/src/send.c:259: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 arg1_string[INTLEN + 1], arg2_string[INTLEN * 2 + 1];
data/libmpdclient-2.19/src/send.c:272: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 arg1_string[INTLEN + 1], arg2_string[INTLEN * 2 + 1];
data/libmpdclient-2.19/src/send.c:285: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 arg1_string[INTLEN*2+1], arg2_string[INTLEN];
data/libmpdclient-2.19/src/send.c:299: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 arg1_string[INTLEN + 1];
data/libmpdclient-2.19/src/send.c:300: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 range_string[FLOATLEN * 2 + 1 + 1];
data/libmpdclient-2.19/src/send.c:313: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 arg_string[LONGLONGLEN];
data/libmpdclient-2.19/src/settings.c:76: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(settings->password, settings->host, at_pos);
data/libmpdclient-2.19/src/settings.c:88: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(settings->host, &oldhost[at_pos + 1], host_len - 1);
data/libmpdclient-2.19/src/settings.c:135:11:  [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).
			port = atoi(env_port);
data/libmpdclient-2.19/src/settings.c:146:25:  [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).
		const int timeout_s = atoi(timeout_string);
data/libmpdclient-2.19/src/song.c:534:31:  [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).
		mpd_song_set_duration(song, atoi(pair->value));
data/libmpdclient-2.19/src/song.c:542:26:  [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).
		mpd_song_set_pos(song, atoi(pair->value));
data/libmpdclient-2.19/src/song.c:544:25:  [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).
		mpd_song_set_id(song, atoi(pair->value));
data/libmpdclient-2.19/src/song.c:546:27:  [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).
		mpd_song_set_prio(song, atoi(pair->value));
data/libmpdclient-2.19/src/stats.c:72:30:  [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).
		stats->number_of_artists = atoi(pair->value);
data/libmpdclient-2.19/src/stats.c:74:29:  [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).
		stats->number_of_albums = atoi(pair->value);
data/libmpdclient-2.19/src/stats.c:76:28:  [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).
		stats->number_of_songs = atoi(pair->value);
data/libmpdclient-2.19/src/status.c:221:20:  [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).
		status->volume = atoi(pair->value);
data/libmpdclient-2.19/src/status.c:223:22:  [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).
		status->repeat = !!atoi(pair->value);
data/libmpdclient-2.19/src/status.c:225:22:  [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).
		status->random = !!atoi(pair->value);
data/libmpdclient-2.19/src/status.c:229:23:  [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).
		status->consume = !!atoi(pair->value);
data/libmpdclient-2.19/src/status.c:233:26:  [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).
		status->queue_length = atoi(pair->value);
data/libmpdclient-2.19/src/status.c:235:23:  [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).
		status->kbit_rate = atoi(pair->value);
data/libmpdclient-2.19/src/status.c:239:22:  [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).
		status->song_pos = atoi(pair->value);
data/libmpdclient-2.19/src/status.c:241:21:  [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).
		status->song_id = atoi(pair->value);
data/libmpdclient-2.19/src/status.c:243:27:  [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).
		status->next_song_pos = atoi(pair->value);
data/libmpdclient-2.19/src/status.c:245:26:  [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).
		status->next_song_id = atoi(pair->value);
data/libmpdclient-2.19/src/status.c:271:23:  [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).
		status->crossfade = atoi(pair->value);
data/libmpdclient-2.19/src/status.c:277:23:  [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).
		status->update_id = atoi(pair->value);
data/libmpdclient-2.19/src/tag.c:39:14:  [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 const char *const mpd_tag_type_names[MPD_TAG_COUNT] =
data/libmpdclient-2.19/test/capture.h:37: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 buffer[4096];
data/libmpdclient-2.19/test/t_iso8601.c:11: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 buffer[64];
data/libmpdclient-2.19/src/async.c:307: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).
	length = strlen(command);
data/libmpdclient-2.19/src/buffer.h:45:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	unsigned read;
data/libmpdclient-2.19/src/buffer.h:68:47:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	memmove(buffer->data, buffer->data + buffer->read,
data/libmpdclient-2.19/src/buffer.h:69:27:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		buffer->write - buffer->read);
data/libmpdclient-2.19/src/buffer.h:71:27:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	buffer->write -= buffer->read;
data/libmpdclient-2.19/src/buffer.h:83:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	assert(buffer->read <= buffer->write);
data/libmpdclient-2.19/src/buffer.h:85:57:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	return sizeof(buffer->data) - (buffer->write - buffer->read);
data/libmpdclient-2.19/src/buffer.h:129:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	assert(buffer->read <= buffer->write);
data/libmpdclient-2.19/src/buffer.h:131:33:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	return buffer->write - buffer->read;
data/libmpdclient-2.19/src/buffer.h:143:32:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	return buffer->data + buffer->read;
data/libmpdclient-2.19/src/capabilities.c:77: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).
	size_t length = strlen(buffer);
data/libmpdclient-2.19/src/capabilities.c:82: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).
		size_t t_length = strlen(t);
data/libmpdclient-2.19/src/connection.c:59: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).
	if (strncmp(output,MPD_WELCOME_MESSAGE,strlen(MPD_WELCOME_MESSAGE)) != 0) {
data/libmpdclient-2.19/src/connection.c:66: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).
	tmp = &output[strlen(MPD_WELCOME_MESSAGE)];
data/libmpdclient-2.19/src/idle.c:161:4:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
			strcat(buffer, " ");
data/libmpdclient-2.19/src/resolver.c:85: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 size_t path_length = strlen(host) + !is_abstract;
data/libmpdclient-2.19/src/search.c:114: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 len = 5 + strlen(strtype) + 1;
data/libmpdclient-2.19/src/search.c:150: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).
	const size_t old_length = strlen(connection->request);
data/libmpdclient-2.19/src/search.c:170: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).
	char *result = malloc(strlen(src) * 2 + 1);
data/libmpdclient-2.19/src/search.c:202: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).
	const size_t add_length = 1 + strlen(name) + 2 + strlen(arg) + 1;
data/libmpdclient-2.19/src/search.c:202: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).
	const size_t add_length = 1 + strlen(name) + 2 + strlen(arg) + 1;
data/libmpdclient-2.19/src/search.c:288: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).
	const size_t add_length = 2 + strlen(arg) + 1;
data/libmpdclient-2.19/src/search.c:427: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).
	const size_t len = 13 + strlen(arg) + 2;
data/libmpdclient-2.19/src/settings.c:80: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).
	host_len = strlen(settings->host) - at_pos;
data/libmpdclient-2.19/src/uri.h:49: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).
		uri[strlen(uri) - 1] != '/';
data/libmpdclient-2.19/test/capture.c:99: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).
	ssize_t nbytes = send(tc->fd, response, strlen(response),

ANALYSIS SUMMARY:

Hits = 108
Lines analyzed = 19283 in approximately 0.53 seconds (36540 lines/second)
Physical Source Lines of Code (SLOC) = 9143
Hits@level = [0]  90 [1]  26 [2]  67 [3]   5 [4]  10 [5]   0
Hits@level+ = [0+] 198 [1+] 108 [2+]  82 [3+]  15 [4+]  10 [5+]   0
Hits/KSLOC@level+ = [0+] 21.6559 [1+] 11.8123 [2+] 8.96861 [3+] 1.6406 [4+] 1.09373 [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.