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/sndio-1.5.0/aucat/abuf.c Examining data/sndio-1.5.0/aucat/abuf.h Examining data/sndio-1.5.0/aucat/afile.c Examining data/sndio-1.5.0/aucat/afile.h Examining data/sndio-1.5.0/aucat/aucat.c Examining data/sndio-1.5.0/aucat/defs.h Examining data/sndio-1.5.0/aucat/dsp.c Examining data/sndio-1.5.0/aucat/dsp.h Examining data/sndio-1.5.0/aucat/sysex.h Examining data/sndio-1.5.0/aucat/utils.c Examining data/sndio-1.5.0/aucat/utils.h Examining data/sndio-1.5.0/bsd-compat/bsd-compat.h Examining data/sndio-1.5.0/bsd-compat/clock_gettime.c Examining data/sndio-1.5.0/bsd-compat/issetugid.c Examining data/sndio-1.5.0/bsd-compat/strlcat.c Examining data/sndio-1.5.0/bsd-compat/strlcpy.c Examining data/sndio-1.5.0/bsd-compat/strtonum.c Examining data/sndio-1.5.0/examples/cap.c Examining data/sndio-1.5.0/examples/fd.c Examining data/sndio-1.5.0/examples/play.c Examining data/sndio-1.5.0/examples/rec.c Examining data/sndio-1.5.0/examples/tools.c Examining data/sndio-1.5.0/examples/tools.h Examining data/sndio-1.5.0/examples/vol.c Examining data/sndio-1.5.0/libsndio/amsg.h Examining data/sndio-1.5.0/libsndio/aucat.c Examining data/sndio-1.5.0/libsndio/aucat.h Examining data/sndio-1.5.0/libsndio/debug.c Examining data/sndio-1.5.0/libsndio/debug.h Examining data/sndio-1.5.0/libsndio/mio.c Examining data/sndio-1.5.0/libsndio/mio_alsa.c Examining data/sndio-1.5.0/libsndio/mio_aucat.c Examining data/sndio-1.5.0/libsndio/mio_priv.h Examining data/sndio-1.5.0/libsndio/mio_rmidi.c Examining data/sndio-1.5.0/libsndio/sio.c Examining data/sndio-1.5.0/libsndio/sio_alsa.c Examining data/sndio-1.5.0/libsndio/sio_aucat.c Examining data/sndio-1.5.0/libsndio/sio_oss.c Examining data/sndio-1.5.0/libsndio/sio_priv.h Examining data/sndio-1.5.0/libsndio/sio_sun.c Examining data/sndio-1.5.0/libsndio/sndio.h Examining data/sndio-1.5.0/midicat/midicat.c Examining data/sndio-1.5.0/sndiod/abuf.c Examining data/sndio-1.5.0/sndiod/abuf.h Examining data/sndio-1.5.0/sndiod/defs.h Examining data/sndio-1.5.0/sndiod/dev.c Examining data/sndio-1.5.0/sndiod/dev.h Examining data/sndio-1.5.0/sndiod/dsp.c Examining data/sndio-1.5.0/sndiod/dsp.h Examining data/sndio-1.5.0/sndiod/file.c Examining data/sndio-1.5.0/sndiod/file.h Examining data/sndio-1.5.0/sndiod/listen.c Examining data/sndio-1.5.0/sndiod/listen.h Examining data/sndio-1.5.0/sndiod/midi.c Examining data/sndio-1.5.0/sndiod/midi.h Examining data/sndio-1.5.0/sndiod/miofile.c Examining data/sndio-1.5.0/sndiod/miofile.h Examining data/sndio-1.5.0/sndiod/opt.c Examining data/sndio-1.5.0/sndiod/opt.h Examining data/sndio-1.5.0/sndiod/siofile.c Examining data/sndio-1.5.0/sndiod/siofile.h Examining data/sndio-1.5.0/sndiod/sndiod.c Examining data/sndio-1.5.0/sndiod/sock.c Examining data/sndio-1.5.0/sndiod/sock.h Examining data/sndio-1.5.0/sndiod/sysex.h Examining data/sndio-1.5.0/sndiod/utils.c Examining data/sndio-1.5.0/sndiod/utils.h Examining data/sndio-1.5.0/version.h FINAL RESULTS: data/sndio-1.5.0/libsndio/aucat.c:418:2: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(ca.sun_path, sizeof(ca.sun_path), data/sndio-1.5.0/libsndio/aucat.c:436:3: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(ca.sun_path, sizeof(ca.sun_path), data/sndio-1.5.0/libsndio/debug.h:26:4: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, __VA_ARGS__); \ data/sndio-1.5.0/libsndio/debug.h:32:4: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, __VA_ARGS__); \ data/sndio-1.5.0/libsndio/mio_rmidi.c:124:2: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(path, sizeof(path), DEVPATH_PREFIX "%u.%u", devnum, subdevnum); data/sndio-1.5.0/libsndio/mio_rmidi.c:126:2: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(path, sizeof(path), DEVPATH_PREFIX "%u", devnum); data/sndio-1.5.0/libsndio/sio_oss.c:262:3: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(path, sizeof(path), DEVPATH_PREFIX "%u", devnum); data/sndio-1.5.0/libsndio/sio_sun.c:303:2: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(path, sizeof(path), DEVPATH_PREFIX "%u", devnum); data/sndio-1.5.0/sndiod/sndiod.c:264:3: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(base, SOCKPATH_MAX, SOCKPATH_DIR); data/sndio-1.5.0/sndiod/sndiod.c:267:3: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(base, SOCKPATH_MAX, SOCKPATH_DIR "-%u", uid); data/sndio-1.5.0/aucat/aucat.c:1382: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 ((c = getopt(argc, argv, data/sndio-1.5.0/examples/cap.c:63: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 ((ch = getopt(argc, argv, "pr")) != -1) { data/sndio-1.5.0/examples/fd.c:203: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 ((ch = getopt(argc, argv, "RXr:c:C:e:i:o:b:x:")) != -1) { data/sndio-1.5.0/examples/play.c:56: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 ((ch = getopt(argc, argv, "r:c:e:b:x:")) != -1) { data/sndio-1.5.0/examples/rec.c:58: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 ((ch = getopt(argc, argv, "b:c:e:n:r:x:")) != -1) { data/sndio-1.5.0/examples/vol.c:75: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 ((ch = getopt(argc, argv, "r:c:e:b:x:")) != -1) { data/sndio-1.5.0/libsndio/aucat.c:261:30: [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. home = issetugid() ? NULL : getenv("HOME"); data/sndio-1.5.0/libsndio/debug.c:37:30: [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. dbg = issetugid() ? NULL : getenv("SNDIO_DEBUG"); data/sndio-1.5.0/libsndio/mio.c:48:9: [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. str = getenv("MIDIDEVICE"); data/sndio-1.5.0/libsndio/sio.c:57:9: [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. str = getenv("AUDIODEVICE"); data/sndio-1.5.0/midicat/midicat.c:78: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 ((c = getopt(argc, argv, "di:o:q:")) != -1) { data/sndio-1.5.0/sndiod/sndiod.c:378: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 ((c = getopt(argc, argv, "a:b:c:C:de:f:j:L:m:q:r:s:t:U:v:w:x:z:")) != -1) { data/sndio-1.5.0/aucat/afile.c:24: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 ld[4]; data/sndio-1.5.0/aucat/afile.c:28: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 lw[2]; data/sndio-1.5.0/aucat/afile.c:32: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 bd[4]; data/sndio-1.5.0/aucat/afile.c:36: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 bw[2]; data/sndio-1.5.0/aucat/afile.c:40: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 id[4]; data/sndio-1.5.0/aucat/afile.c:42: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 type[4]; data/sndio-1.5.0/aucat/afile.c:46: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 id[4]; data/sndio-1.5.0/aucat/afile.c:68: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 guid[14]; data/sndio-1.5.0/aucat/afile.c:79: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 id[4]; data/sndio-1.5.0/aucat/afile.c:81: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 type[4]; data/sndio-1.5.0/aucat/afile.c:85: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 id[4]; data/sndio-1.5.0/aucat/afile.c:99: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 comp_id[4]; data/sndio-1.5.0/aucat/afile.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 id[4]; data/sndio-1.5.0/aucat/afile.c:130: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 desc[8]; data/sndio-1.5.0/aucat/afile.c:134: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 wav_id_riff[4] = {'R', 'I', 'F', 'F'}; data/sndio-1.5.0/aucat/afile.c:135: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 wav_id_wave[4] = {'W', 'A', 'V', 'E'}; data/sndio-1.5.0/aucat/afile.c:136: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 wav_id_data[4] = {'d', 'a', 't', 'a'}; data/sndio-1.5.0/aucat/afile.c:137: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 wav_id_fmt[4] = {'f', 'm', 't', ' '}; data/sndio-1.5.0/aucat/afile.c:138: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 wav_guid[14] = { data/sndio-1.5.0/aucat/afile.c:145: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 aiff_id_form[4] = {'F', 'O', 'R', 'M'}; data/sndio-1.5.0/aucat/afile.c:146: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 aiff_id_aiff[4] = {'A', 'I', 'F', 'F'}; data/sndio-1.5.0/aucat/afile.c:147: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 aiff_id_aifc[4] = {'A', 'I', 'F', 'C'}; data/sndio-1.5.0/aucat/afile.c:148: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 aiff_id_data[4] = {'S', 'S', 'N', 'D'}; data/sndio-1.5.0/aucat/afile.c:149: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 aiff_id_comm[4] = {'C', 'O', 'M', 'M'}; data/sndio-1.5.0/aucat/afile.c:150: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 aiff_id_none[4] = {'N', 'O', 'N', 'E'}; data/sndio-1.5.0/aucat/afile.c:151: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 aiff_id_fl32[4] = {'f', 'l', '3', '2'}; data/sndio-1.5.0/aucat/afile.c:152: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 aiff_id_ulaw[4] = {'u', 'l', 'a', 'w'}; data/sndio-1.5.0/aucat/afile.c:153: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 aiff_id_alaw[4] = {'a', 'l', 'a', 'w'}; data/sndio-1.5.0/aucat/afile.c:155: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 au_id[4] = {'.', 's', 'n', 'd'}; data/sndio-1.5.0/aucat/afile.c:430: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(hdr.riff.id, wav_id_riff, 4); data/sndio-1.5.0/aucat/afile.c:431: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(hdr.riff.type, wav_id_wave, 4); data/sndio-1.5.0/aucat/afile.c:433: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(hdr.fmt_hdr.id, wav_id_fmt, 4); data/sndio-1.5.0/aucat/afile.c:441: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(hdr.data_hdr.id, wav_id_data, 4); data/sndio-1.5.0/aucat/afile.c:633: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(hdr.form.id, aiff_id_form, 4); data/sndio-1.5.0/aucat/afile.c:634: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(hdr.form.type, aiff_id_aiff, 4); data/sndio-1.5.0/aucat/afile.c:637: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(hdr.comm_hdr.id, aiff_id_comm, 4); data/sndio-1.5.0/aucat/afile.c:646: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(hdr.data_hdr.id, aiff_id_data, 4); data/sndio-1.5.0/aucat/afile.c:730: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(hdr.id, au_id, 4); data/sndio-1.5.0/aucat/afile.c:898: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). f->fd = open(f->path, O_RDONLY, 0); data/sndio-1.5.0/aucat/afile.c:926: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). f->fd = open(f->path, data/sndio-1.5.0/aucat/aucat.c:121:10: [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 dev_msg[MIDI_MSGMAX]; /* parsed input message */ data/sndio-1.5.0/aucat/aucat.c:1156: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 mbuf[MIDIBUFSZ]; data/sndio-1.5.0/aucat/dsp.c:252: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 enc[ENCMAX]; data/sndio-1.5.0/aucat/utils.c:43: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 log_buf[LOG_BUFSZ]; /* buffer where traces are stored */ data/sndio-1.5.0/aucat/utils.c:81: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 dig[sizeof(num) * 2], *p = dig, c; data/sndio-1.5.0/aucat/utils.c:104: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 dig[sizeof(num) * 3], *p = dig; data/sndio-1.5.0/aucat/utils.c:186: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(p, s, size); data/sndio-1.5.0/examples/fd.c:16: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[BUF_LEN]; data/sndio-1.5.0/examples/fd.c:302: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). recfd = open(recpath, O_CREAT | O_WRONLY | O_TRUNC, 0666); data/sndio-1.5.0/examples/fd.c:310: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). playfd = open(playpath, O_RDONLY, 0); data/sndio-1.5.0/examples/vol.c:18:10: [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 buf[BUFSZ]; data/sndio-1.5.0/examples/vol.c:57:8: [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). tty = open("/dev/tty", O_RDWR); data/sndio-1.5.0/libsndio/amsg.h:104:4: [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 opt[AMSG_OPTMAX]; /* profile name */ data/sndio-1.5.0/libsndio/amsg.h:105:4: [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 who[12]; /* hint for leases */ data/sndio-1.5.0/libsndio/aucat.c:52:7: [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 = open(DEV_RANDOM, O_RDONLY); data/sndio-1.5.0/libsndio/aucat.c:268: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(path, home, home_len); data/sndio-1.5.0/libsndio/aucat.c:269: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(path + home_len, COOKIE_SUFFIX, sizeof(COOKIE_SUFFIX)); data/sndio-1.5.0/libsndio/aucat.c:271:7: [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 = open(path, O_RDONLY); data/sndio-1.5.0/libsndio/aucat.c:323: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(tmp, home, home_len); data/sndio-1.5.0/libsndio/aucat.c:324: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(tmp + home_len, COOKIE_DIR, sizeof(COOKIE_DIR)); data/sndio-1.5.0/libsndio/aucat.c:329: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(tmp, path, path_len); data/sndio-1.5.0/libsndio/aucat.c:330: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(tmp + path_len, TEMPL_SUFFIX, sizeof(TEMPL_SUFFIX)); data/sndio-1.5.0/libsndio/aucat.c:331:7: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). fd = mkstemp(tmp); data/sndio-1.5.0/libsndio/aucat.c:358: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 serv[NI_MAXSERV]; data/sndio-1.5.0/libsndio/aucat.c:498: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 host[NI_MAXHOST], opt[AMSG_OPTMAX]; data/sndio-1.5.0/libsndio/aucat.c:598: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 dummy[1]; data/sndio-1.5.0/libsndio/mio_alsa.c:102: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(hdl->devname, DEVNAME_PREFIX, sizeof(DEVNAME_PREFIX) - 1); data/sndio-1.5.0/libsndio/mio_alsa.c:103: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(hdl->devname + sizeof(DEVNAME_PREFIX) - 1, p, len + 1); data/sndio-1.5.0/libsndio/mio_rmidi.c:73: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 path[DEVPATH_MAX]; data/sndio-1.5.0/libsndio/mio_rmidi.c:132:15: [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). while ((fd = open(path, flags | O_NONBLOCK | O_CLOEXEC)) < 0) { data/sndio-1.5.0/libsndio/sio.c:263: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 dummy[DROP_NMAX]; data/sndio-1.5.0/libsndio/sio.c:283: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 zero[ZERO_NMAX]; data/sndio-1.5.0/libsndio/sio_alsa.c:313: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(hdl->devname, DEVNAME_PREFIX, sizeof(DEVNAME_PREFIX) - 1); data/sndio-1.5.0/libsndio/sio_alsa.c:314: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(hdl->devname + sizeof(DEVNAME_PREFIX) - 1, p, len + 1); data/sndio-1.5.0/libsndio/sio_alsa.c:942: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(buf, hdl->itmpbuf + hdl->ibpf - hdl->ipartial, todo); data/sndio-1.5.0/libsndio/sio_alsa.c:992: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(hdl->otmpbuf + hdl->opartial, buf, todo); data/sndio-1.5.0/libsndio/sio_aucat.c:214:18: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static unsigned char zero[ZERO_MAX]; data/sndio-1.5.0/libsndio/sio_oss.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 path[DEVPATH_MAX]; data/sndio-1.5.0/libsndio/sio_oss.c:268:15: [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). while ((fd = open(path, flags | O_NONBLOCK | O_CLOEXEC)) < 0) { data/sndio-1.5.0/libsndio/sio_sun.c:274: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 path[DEVPATH_MAX]; data/sndio-1.5.0/libsndio/sio_sun.c:308:15: [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). while ((fd = open(path, flags | O_NONBLOCK | O_CLOEXEC)) < 0) { data/sndio-1.5.0/midicat/midicat.c:31:10: [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 buf[MIDI_BUFSZ]; data/sndio-1.5.0/midicat/midicat.c:136: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). ifd = open(ifile, O_RDONLY, 0); data/sndio-1.5.0/midicat/midicat.c:146: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). ofd = open(ofile, O_WRONLY | O_CREAT | O_TRUNC, 0666); data/sndio-1.5.0/sndiod/dev.c:203: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 buf[2]; data/sndio-1.5.0/sndiod/dev.c:323: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 msg[3]; data/sndio-1.5.0/sndiod/dev.c:1537: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[SLOT_NAMEMAX]; data/sndio-1.5.0/sndiod/dev.h:88: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[SLOT_NAMEMAX]; /* name matching [a-z]+ */ data/sndio-1.5.0/sndiod/dev.h: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 name[OPT_NAMEMAX + 1]; data/sndio-1.5.0/sndiod/dsp.c:183: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 enc[ENCMAX]; data/sndio-1.5.0/sndiod/listen.c:131: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 *host, serv[sizeof(unsigned int) * 3 + 1]; data/sndio-1.5.0/sndiod/midi.c:361: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(odata, idata, ocount); data/sndio-1.5.0/sndiod/midi.h:69: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 msg[MIDI_MSGMAX]; /* parsed input message */ data/sndio-1.5.0/sndiod/miofile.c:89: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[MIDI_BUFSZ]; data/sndio-1.5.0/sndiod/opt.c:69: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(o->name, name, len + 1); data/sndio-1.5.0/sndiod/sndiod.c:341: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 base[SOCKPATH_MAX], path[SOCKPATH_MAX]; data/sndio-1.5.0/sndiod/sock.c:470: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 midibuf[MIDI_BUFSZ]; data/sndio-1.5.0/sndiod/sock.c:516:18: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static unsigned char dummy[AMSG_DATAMAX]; data/sndio-1.5.0/sndiod/sock.c:754: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(sock_sescookie, p->cookie, AMSG_COOKIELEN); data/sndio-1.5.0/sndiod/utils.c:43: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 log_buf[LOG_BUFSZ]; /* buffer where traces are stored */ data/sndio-1.5.0/sndiod/utils.c:81: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 dig[sizeof(num) * 2], *p = dig, c; data/sndio-1.5.0/sndiod/utils.c:104: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 dig[sizeof(num) * 3], *p = dig; data/sndio-1.5.0/sndiod/utils.c:186: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(p, s, size); data/sndio-1.5.0/aucat/afile.c:227:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(f->fd, addr, size) != size) { data/sndio-1.5.0/aucat/afile.c:304:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(f->fd, &fmt, csize) != csize) { data/sndio-1.5.0/aucat/afile.c:380:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(f->fd, &chunk, sizeof(chunk)) != sizeof(chunk)) { data/sndio-1.5.0/aucat/afile.c:463:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(f->fd, &comm, csize_min) != csize_min) { data/sndio-1.5.0/aucat/afile.c:520:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(f->fd, &data, csize) != csize) { data/sndio-1.5.0/aucat/afile.c:560:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(f->fd, &chunk, sizeof(chunk)) != sizeof(chunk)) { data/sndio-1.5.0/aucat/afile.c:780:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = read(f->fd, data, count); data/sndio-1.5.0/aucat/utils.c:184: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). size = strlen(s) + 1; data/sndio-1.5.0/bsd-compat/strlcat.c:46: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). return(dlen + strlen(s)); data/sndio-1.5.0/examples/fd.c:61:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = read(fd, buf->data + end, count); data/sndio-1.5.0/examples/play.c:127:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). len = read(STDIN_FILENO, buf, bufsz); data/sndio-1.5.0/examples/vol.c:127:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(tty, &cmd, 1) < 0) { data/sndio-1.5.0/examples/vol.c:147:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). len = read(STDIN_FILENO, buf, BUFSZ); data/sndio-1.5.0/libsndio/aucat.c:58:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = read(fd, buf, len); data/sndio-1.5.0/libsndio/aucat.c:95:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((n = read(hdl->fd, data, hdl->rtodo)) < 0) { data/sndio-1.5.0/libsndio/aucat.c:173:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((n = read(hdl->fd, buf, len)) < 0) { data/sndio-1.5.0/libsndio/aucat.c:264: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). home_len = strlen(home); data/sndio-1.5.0/libsndio/aucat.c:285:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). len = read(fd, cookie, AMSG_COOKIELEN); data/sndio-1.5.0/libsndio/aucat.c:606:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while (read(hdl->fd, dummy, 1) < 0 && errno == EINTR) data/sndio-1.5.0/libsndio/mio.c:150:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = hdl->ops->read(hdl, data, todo); data/sndio-1.5.0/libsndio/mio_alsa.c:96:8: [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(p); data/sndio-1.5.0/libsndio/mio_priv.h:40:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). size_t (*read)(struct mio_hdl *, void *, size_t); data/sndio-1.5.0/libsndio/mio_rmidi.c:192:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((n = read(hdl->fd, buf, len)) < 0) { data/sndio-1.5.0/libsndio/sio.c:270:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = hdl->ops->read(hdl, dummy, todo); data/sndio-1.5.0/libsndio/sio.c:325:31: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = maxread > 0 ? hdl->ops->read(hdl, data, maxread) : 0; data/sndio-1.5.0/libsndio/sio_alsa.c:309:8: [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(p); data/sndio-1.5.0/libsndio/sio_oss.c:586:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((n = read(hdl->fd, buf, len)) < 0) { data/sndio-1.5.0/libsndio/sio_priv.h:58:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). size_t (*read)(struct sio_hdl *, void *, size_t); data/sndio-1.5.0/libsndio/sio_sun.c:487:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((n = read(hdl->fd, buf, len)) < 0) { data/sndio-1.5.0/midicat/midicat.c:183:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). buf_used = read(ifd, buf, sizeof(buf)); data/sndio-1.5.0/sndiod/listen.c:101:13: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). oldumask = umask(0111); data/sndio-1.5.0/sndiod/listen.c:113:2: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(oldumask); data/sndio-1.5.0/sndiod/sndiod.c:269:10: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). omask = umask(mask); data/sndio-1.5.0/sndiod/sndiod.c:274:2: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(omask); data/sndio-1.5.0/sndiod/sock.c:364:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = read(f->fd, data, count); data/sndio-1.5.0/sndiod/utils.c:184: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). size = strlen(s) + 1; ANALYSIS SUMMARY: Hits = 161 Lines analyzed = 19862 in approximately 0.46 seconds (43041 lines/second) Physical Source Lines of Code (SLOC) = 16002 Hits@level = [0] 103 [1] 36 [2] 103 [3] 12 [4] 10 [5] 0 Hits@level+ = [0+] 264 [1+] 161 [2+] 125 [3+] 22 [4+] 10 [5+] 0 Hits/KSLOC@level+ = [0+] 16.4979 [1+] 10.0612 [2+] 7.81152 [3+] 1.37483 [4+] 0.624922 [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.