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/alsa-plugins-1.2.2/pulse/pcm_pulse.c Examining data/alsa-plugins-1.2.2/pulse/ctl_pulse.c Examining data/alsa-plugins-1.2.2/pulse/pulse.c Examining data/alsa-plugins-1.2.2/pulse/conf_pulse.c Examining data/alsa-plugins-1.2.2/pulse/pulse.h Examining data/alsa-plugins-1.2.2/rate/rate_samplerate.c Examining data/alsa-plugins-1.2.2/maemo/alsa-dsp.c Examining data/alsa-plugins-1.2.2/maemo/dsp-protocol.h Examining data/alsa-plugins-1.2.2/maemo/constants.h Examining data/alsa-plugins-1.2.2/maemo/types.h Examining data/alsa-plugins-1.2.2/maemo/reporting.h Examining data/alsa-plugins-1.2.2/maemo/dsp-ctl.c Examining data/alsa-plugins-1.2.2/maemo/list.h Examining data/alsa-plugins-1.2.2/maemo/debug.h Examining data/alsa-plugins-1.2.2/maemo/dsp-protocol.c Examining data/alsa-plugins-1.2.2/arcam-av/ctl_arcam_av.c Examining data/alsa-plugins-1.2.2/arcam-av/arcam_av.h Examining data/alsa-plugins-1.2.2/arcam-av/arcam_av.c Examining data/alsa-plugins-1.2.2/speex/pcm_speex.c Examining data/alsa-plugins-1.2.2/usb_stream/usb_stream.h Examining data/alsa-plugins-1.2.2/usb_stream/pcm_usb_stream.c Examining data/alsa-plugins-1.2.2/rate-lav/gcd.h Examining data/alsa-plugins-1.2.2/rate-lav/rate_lavrate.c Examining data/alsa-plugins-1.2.2/oss/ctl_oss.c Examining data/alsa-plugins-1.2.2/oss/pcm_oss.c Examining data/alsa-plugins-1.2.2/pph/fixed_generic.h Examining data/alsa-plugins-1.2.2/pph/resample.c Examining data/alsa-plugins-1.2.2/pph/speex_resampler.h Examining data/alsa-plugins-1.2.2/pph/rate_speexrate.c Examining data/alsa-plugins-1.2.2/pph/arch.h Examining data/alsa-plugins-1.2.2/jack/pcm_jack.c Examining data/alsa-plugins-1.2.2/aaf/pcm_aaf.c Examining data/alsa-plugins-1.2.2/mix/pcm_upmix.c Examining data/alsa-plugins-1.2.2/mix/pcm_vdownmix.c Examining data/alsa-plugins-1.2.2/a52/pcm_a52.c FINAL RESULTS: data/alsa-plugins-1.2.2/arcam-av/ctl_arcam_av.c:921:6: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(port, R_OK | W_OK) < 0) { data/alsa-plugins-1.2.2/arcam-av/ctl_arcam_av.c:943:19: [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). arcam_av->port = strcpy((char*)(arcam_av + 1), port); data/alsa-plugins-1.2.2/jack/pcm_jack.c:89: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(elem->name, name); data/alsa-plugins-1.2.2/maemo/debug.h:30:28: [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. #define DPRINT(fmt,arg...) fprintf(DEBUG_OUTPUT, "%s(): " fmt,\ data/alsa-plugins-1.2.2/maemo/debug.h:44:29: [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. #define DERROR(fmt,arg...) fprintf(stderr, "%s(): " fmt, \ data/alsa-plugins-1.2.2/usb_stream/pcm_usb_stream.c:99:3: [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(r_uus->card, card); data/alsa-plugins-1.2.2/pulse/conf_pulse.c:48:6: [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. if (getenv("PULSE_INTERNAL") != NULL) data/alsa-plugins-1.2.2/a52/pcm_a52.c:263: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(dst, areas->addr + offset * io->channels * 2, data/alsa-plugins-1.2.2/a52/pcm_a52.c:279:5: [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(rec->frame->data[ch], src, size * 2); data/alsa-plugins-1.2.2/a52/pcm_a52.c:695: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->map.pos, i < 2 ? chmap4 : chmap6, data/alsa-plugins-1.2.2/a52/pcm_a52.c:711: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(map->pos, io->channels < 6 ? chmap4 : chmap6, data/alsa-plugins-1.2.2/a52/pcm_a52.c:819: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 devstr[128], tmpcard[8]; data/alsa-plugins-1.2.2/aaf/pcm_aaf.c:57: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 ifname[IFNAMSIZ]; data/alsa-plugins-1.2.2/aaf/pcm_aaf.c:58: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 addr[ETH_ALEN]; data/alsa-plugins-1.2.2/aaf/pcm_aaf.c:187:13: [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 addr[6]; data/alsa-plugins-1.2.2/aaf/pcm_aaf.c:286: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(&aaf->sk_addr.sll_addr, aaf->addr, ETH_ALEN); data/alsa-plugins-1.2.2/aaf/pcm_aaf.c:322: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(&mreq.mr_address, aaf->addr, ETH_ALEN); data/alsa-plugins-1.2.2/arcam-av/arcam_av.c:49: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(port, O_RDWR | O_NOCTTY); data/alsa-plugins-1.2.2/arcam-av/arcam_av.c:69: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 buffer[7] = {'P', 'C', '_', command, param1, param2, 0x0D}; data/alsa-plugins-1.2.2/arcam-av/arcam_av.c:96: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. static char buffer[8]; data/alsa-plugins-1.2.2/arcam-av/arcam_av.h:148:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char state[9]; data/alsa-plugins-1.2.2/arcam-av/arcam_av.h:157:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char state[4]; data/alsa-plugins-1.2.2/arcam-av/ctl_arcam_av.c:849: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 buf[10]; data/alsa-plugins-1.2.2/jack/pcm_jack.c:39: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[0]; data/alsa-plugins-1.2.2/jack/pcm_jack.c:99: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[32]; data/alsa-plugins-1.2.2/jack/pcm_jack.c:119: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[1]; data/alsa-plugins-1.2.2/jack/pcm_jack.c:281: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 port_name[32]; data/alsa-plugins-1.2.2/jack/pcm_jack.c:284:4: [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(port_name, "out_%03d", i); data/alsa-plugins-1.2.2/jack/pcm_jack.c:289:4: [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(port_name, "in_%03d", i); data/alsa-plugins-1.2.2/jack/pcm_jack.c:492:13: [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). channel = atoi(id); data/alsa-plugins-1.2.2/jack/pcm_jack.c:541: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 jack_client_name[32]; data/alsa-plugins-1.2.2/maemo/dsp-ctl.c:598:2: [2] (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). Risk is low because the source is a constant string. strcpy(dsp_ctl->ext.id, "ALSA-DSP-CTL"); data/alsa-plugins-1.2.2/maemo/dsp-ctl.c:599:2: [2] (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). Risk is low because the source is a constant string. strcpy(dsp_ctl->ext.name, "Alsa-DSP external ctl plugin"); data/alsa-plugins-1.2.2/maemo/dsp-ctl.c:600:2: [2] (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). Risk is low because the source is a constant string. strcpy(dsp_ctl->ext.longname, "External Control Alsa plugin for DSP"); data/alsa-plugins-1.2.2/maemo/dsp-ctl.c:601:2: [2] (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). Risk is low because the source is a constant string. strcpy(dsp_ctl->ext.mixername, "ALSA-DSP plugin Mixer"); data/alsa-plugins-1.2.2/maemo/dsp-protocol.c:145:21: [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). dsp_protocol->fd = open(device, O_RDWR); data/alsa-plugins-1.2.2/maemo/dsp-protocol.c:392: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(dsp_protocol->mmap_buffer, data, count * 2); data/alsa-plugins-1.2.2/maemo/dsp-protocol.c:454: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(data, dsp_protocol->mmap_buffer, count * 2); data/alsa-plugins-1.2.2/maemo/dsp-protocol.c:876:16: [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). if ((mic_fd = open(mic_control_name, O_WRONLY)) < 0) { data/alsa-plugins-1.2.2/maemo/dsp-protocol.c:916:21: [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). dsp_protocol->fd = open(device, O_RDWR); data/alsa-plugins-1.2.2/mix/pcm_upmix.c:403: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->map.pos, &chmap[i][0], (i + 1) * sizeof(int)); data/alsa-plugins-1.2.2/mix/pcm_upmix.c:418: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(map->pos, &chmap[ext->channels - 1][0], ext->channels * sizeof(int)); data/alsa-plugins-1.2.2/mix/pcm_vdownmix.c:304: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->map.pos, chmap, (i + 4) * sizeof(int)); data/alsa-plugins-1.2.2/mix/pcm_vdownmix.c:319: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(map->pos, chmap, ext->channels * sizeof(int)); data/alsa-plugins-1.2.2/oss/ctl_oss.c:43: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 vol_devices[SOUND_MIXER_NRDEVICES] = { data/alsa-plugins-1.2.2/oss/ctl_oss.c:71: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 rec_devices[SOUND_MIXER_NRDEVICES] = { data/alsa-plugins-1.2.2/oss/ctl_oss.c:89: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 rec_items[SOUND_MIXER_NRDEVICES] = { data/alsa-plugins-1.2.2/oss/ctl_oss.c:395: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). oss->fd = open(device, O_RDWR); data/alsa-plugins-1.2.2/oss/ctl_oss.c:411:2: [2] (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). Risk is low because the source is a constant string. strcpy(oss->ext.driver, "OSS-Emulation"); data/alsa-plugins-1.2.2/oss/pcm_oss.c:197:13: [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). oss->fd = open(oss->device, io->stream == SND_PCM_STREAM_PLAYBACK ? data/alsa-plugins-1.2.2/oss/pcm_oss.c:393: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). oss->fd = open(device, stream == SND_PCM_STREAM_PLAYBACK ? data/alsa-plugins-1.2.2/pph/rate_speexrate.c:175: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(ops, &pcm_src_ops, sizeof(snd_pcm_rate_old_ops_t)); data/alsa-plugins-1.2.2/pulse/pcm_pulse.c:534: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(dst_buf, src_buf, frag_length); data/alsa-plugins-1.2.2/pulse/pulse.c:126: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 proc[PATH_MAX], buf[PATH_MAX + 20]; data/alsa-plugins-1.2.2/pulse/pulse.c:260:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[10]; data/alsa-plugins-1.2.2/rate-lav/rate_lavrate.c:198: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(ops, &pcm_src_ops, sizeof(snd_pcm_rate_old_ops_t)); data/alsa-plugins-1.2.2/rate/rate_samplerate.c:205: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(ops, &pcm_src_ops, sizeof(snd_pcm_rate_old_ops_t)); data/alsa-plugins-1.2.2/speex/pcm_speex.c:77: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(dst, src, count * 2); data/alsa-plugins-1.2.2/speex/pcm_speex.c:93: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(dst, databuf + spx->filled, chunk * 2); data/alsa-plugins-1.2.2/speex/pcm_speex.c:97: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(spx->buf + spx->filled, src, chunk * 2); data/alsa-plugins-1.2.2/usb_stream/pcm_usb_stream.c:55: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 card[LCARD]; data/alsa-plugins-1.2.2/usb_stream/pcm_usb_stream.c:289: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(playback_addr, src, s->outpacket[0].length); data/alsa-plugins-1.2.2/usb_stream/pcm_usb_stream.c:293: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(playback_addr, src + s->outpacket[0].length, data/alsa-plugins-1.2.2/usb_stream/pcm_usb_stream.c:310: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(to + l, i, il); data/alsa-plugins-1.2.2/usb_stream/pcm_usb_stream.c:409: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 us_name[32]; data/alsa-plugins-1.2.2/aaf/pcm_aaf.c:1035:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = read(aaf->timer_fd, &expirations, sizeof(uint64_t)); data/alsa-plugins-1.2.2/arcam-av/arcam_av.c:99:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t bytes = read(fd, buffer, sizeof buffer - index); data/alsa-plugins-1.2.2/arcam-av/arcam_av.c:518:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(&address.sun_path[1], port, sizeof(address.sun_path) - 1); data/alsa-plugins-1.2.2/arcam-av/arcam_av.c:520: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). MIN(strlen(port) + 1, sizeof(address.sun_path)); data/alsa-plugins-1.2.2/arcam-av/arcam_av.c:619:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(&address.sun_path[1], port, sizeof(address.sun_path) - 1); data/alsa-plugins-1.2.2/arcam-av/arcam_av.c:621: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). MIN(strlen(port) + 1, sizeof(address.sun_path)); data/alsa-plugins-1.2.2/arcam-av/ctl_arcam_av.c:423:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(name, label, name_max_len - 1); data/alsa-plugins-1.2.2/arcam-av/ctl_arcam_av.c:926:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). arcam_av = calloc(1, sizeof(*arcam_av) + strlen(port) + 1); data/alsa-plugins-1.2.2/arcam-av/ctl_arcam_av.c:933:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(arcam_av->ext.id, arcam_av_name, sizeof(arcam_av->ext.id) - 1); data/alsa-plugins-1.2.2/arcam-av/ctl_arcam_av.c:934:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(arcam_av->ext.name, arcam_av_name, sizeof(arcam_av->ext.name) - 1); data/alsa-plugins-1.2.2/arcam-av/ctl_arcam_av.c:935:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(arcam_av->ext.longname, arcam_av_name, sizeof(arcam_av->ext.longname) - 1); data/alsa-plugins-1.2.2/arcam-av/ctl_arcam_av.c:936:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(arcam_av->ext.mixername, arcam_av_name, sizeof(arcam_av->ext.mixername) - 1); data/alsa-plugins-1.2.2/jack/pcm_jack.c:79:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). const size_t name_size = strlen(name) + 1; data/alsa-plugins-1.2.2/jack/pcm_jack.c:108:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while (read(io->poll_fd, &buf, sizeof(buf)) == sizeof(buf)) data/alsa-plugins-1.2.2/jack/pcm_jack.c:576:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). __func__, jack_client_name, (int)strlen(jack_client_name)); data/alsa-plugins-1.2.2/maemo/dsp-protocol.c:162:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((ret = read(dsp_protocol->fd, &audio_status_info, data/alsa-plugins-1.2.2/maemo/dsp-protocol.c:175:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((ret = read(dsp_protocol->fd, &audio_init_status, data/alsa-plugins-1.2.2/maemo/dsp-protocol.c:245:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(dsp_protocol->fd, &audio_cmd_status, data/alsa-plugins-1.2.2/maemo/dsp-protocol.c:301:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(dsp_protocol->fd, &audio_cmd_status, data/alsa-plugins-1.2.2/maemo/dsp-protocol.c:399:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((ret = read(dsp_protocol->fd, &write_status, data/alsa-plugins-1.2.2/maemo/dsp-protocol.c:460:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((ret = read(dsp_protocol->fd, &read_status, data/alsa-plugins-1.2.2/maemo/dsp-protocol.c:658:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(dsp_protocol->fd, &audio_cmd_status, data/alsa-plugins-1.2.2/maemo/dsp-protocol.c:689:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(dsp_protocol->fd, &audio_cmd_status, data/alsa-plugins-1.2.2/maemo/dsp-protocol.c:733:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((ret = read(dsp_protocol->fd, &audio_status_info, data/alsa-plugins-1.2.2/maemo/dsp-protocol.c:989:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(dsp_protocol->fd, &tmp, sizeof(short int)) == 0) data/alsa-plugins-1.2.2/maemo/dsp-protocol.c:1026:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(dsp_protocol->fd, &audio_cmd_status, data/alsa-plugins-1.2.2/maemo/dsp-protocol.c:1118:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((ret = read(dsp_protocol->fd, &audio_status_info, data/alsa-plugins-1.2.2/oss/ctl_oss.c:244:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(name, rec_items[item], name_max_len - 1); data/alsa-plugins-1.2.2/oss/ctl_oss.c:410:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(oss->ext.id, mixinfo.id, sizeof(oss->ext.id) - 1); data/alsa-plugins-1.2.2/oss/ctl_oss.c:412:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(oss->ext.name, mixinfo.name, sizeof(oss->ext.name) - 1); data/alsa-plugins-1.2.2/oss/ctl_oss.c:413:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(oss->ext.longname, mixinfo.name, sizeof(oss->ext.longname) - 1); data/alsa-plugins-1.2.2/oss/ctl_oss.c:414:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(oss->ext.mixername, mixinfo.name, sizeof(oss->ext.mixername) - 1); data/alsa-plugins-1.2.2/oss/pcm_oss.c:69:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). result = read(oss->fd, buf, size); data/alsa-plugins-1.2.2/oss/pcm_oss.c:100:4: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(oss->fd, &tmp, 0); data/alsa-plugins-1.2.2/pulse/ctl_pulse.c:787:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(ctl->ext.id, "pulse", sizeof(ctl->ext.id) - 1); data/alsa-plugins-1.2.2/pulse/ctl_pulse.c:788:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(ctl->ext.driver, "PulseAudio plugin", data/alsa-plugins-1.2.2/pulse/ctl_pulse.c:790:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(ctl->ext.name, "PulseAudio", sizeof(ctl->ext.name) - 1); data/alsa-plugins-1.2.2/pulse/ctl_pulse.c:791:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(ctl->ext.longname, "PulseAudio", data/alsa-plugins-1.2.2/pulse/ctl_pulse.c:793:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(ctl->ext.mixername, "PulseAudio", data/alsa-plugins-1.2.2/pulse/pulse.c:265:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while (read(p->main_fd, buf, sizeof(buf)) > 0); data/alsa-plugins-1.2.2/usb_stream/pcm_usb_stream.c:411: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(card) >= LCARD) data/alsa-plugins-1.2.2/usb_stream/pcm_usb_stream.c:422: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). __func__, us_name, (int)strlen(us_name)); ANALYSIS SUMMARY: Hits = 107 Lines analyzed = 16143 in approximately 0.36 seconds (44872 lines/second) Physical Source Lines of Code (SLOC) = 12017 Hits@level = [0] 35 [1] 42 [2] 58 [3] 1 [4] 6 [5] 0 Hits@level+ = [0+] 142 [1+] 107 [2+] 65 [3+] 7 [4+] 6 [5+] 0 Hits/KSLOC@level+ = [0+] 11.8166 [1+] 8.90405 [2+] 5.409 [3+] 0.582508 [4+] 0.499293 [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.