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/lirc-0.10.1/tools/irpipe.cpp Examining data/lirc-0.10.1/tools/lirc-lsremotes.cpp Examining data/lirc-0.10.1/tools/irtestcase.cpp Examining data/lirc-0.10.1/tools/ircat.cpp Examining data/lirc-0.10.1/tools/irsimsend.cpp Examining data/lirc-0.10.1/tools/xmode2.cpp Examining data/lirc-0.10.1/tools/irxevent.cpp Examining data/lirc-0.10.1/tools/irexec.cpp Examining data/lirc-0.10.1/tools/irsimreceive.cpp Examining data/lirc-0.10.1/tools/irw.cpp Examining data/lirc-0.10.1/tools/irrecord-ui.cpp Examining data/lirc-0.10.1/tools/irsend.cpp Examining data/lirc-0.10.1/tools/irpty.cpp Examining data/lirc-0.10.1/tools/lirc-lsplugins.cpp Examining data/lirc-0.10.1/tools/mode2.cpp Examining data/lirc-0.10.1/python-pkg/lirc/_client.c Examining data/lirc-0.10.1/drivers/irpipe/irpipe.h Examining data/lirc-0.10.1/include/media/lirc.h Examining data/lirc-0.10.1/include/linux/input-event-codes.h Examining data/lirc-0.10.1/plugins/awlibusb.c Examining data/lirc-0.10.1/plugins/dsp.c Examining data/lirc-0.10.1/plugins/udp.c Examining data/lirc-0.10.1/plugins/girs.c Examining data/lirc-0.10.1/plugins/atilibusb.c Examining data/lirc-0.10.1/plugins/pinsys.c Examining data/lirc-0.10.1/plugins/irtoy.c Examining data/lirc-0.10.1/plugins/uirt2_raw.c Examining data/lirc-0.10.1/plugins/osx_usbraw.c Examining data/lirc-0.10.1/plugins/tira.c Examining data/lirc-0.10.1/plugins/hiddev.c Examining data/lirc-0.10.1/plugins/ea65.c Examining data/lirc-0.10.1/plugins/mp3anywhere.c Examining data/lirc-0.10.1/plugins/dfclibusb.c Examining data/lirc-0.10.1/plugins/uirt2_common.c Examining data/lirc-0.10.1/plugins/mouseremote.c Examining data/lirc-0.10.1/plugins/commandir.c Examining data/lirc-0.10.1/plugins/i2cuser.c Examining data/lirc-0.10.1/plugins/uirt2_common.h Examining data/lirc-0.10.1/plugins/srm7500libusb.c Examining data/lirc-0.10.1/plugins/creative_infracd.c Examining data/lirc-0.10.1/plugins/livedrive_common.h Examining data/lirc-0.10.1/plugins/audio.c Examining data/lirc-0.10.1/plugins/audio_alsa.c Examining data/lirc-0.10.1/plugins/mplay.c Examining data/lirc-0.10.1/plugins/livedrive_midi.c Examining data/lirc-0.10.1/plugins/pcmak.c Examining data/lirc-0.10.1/plugins/livedrive_seq.c Examining data/lirc-0.10.1/plugins/accent.c Examining data/lirc-0.10.1/plugins/livedrive_common.c Examining data/lirc-0.10.1/plugins/bte.c Examining data/lirc-0.10.1/plugins/silitek.c Examining data/lirc-0.10.1/plugins/default.c Examining data/lirc-0.10.1/plugins/creative.c Examining data/lirc-0.10.1/plugins/irlink.c Examining data/lirc-0.10.1/plugins/logitech.c Examining data/lirc-0.10.1/plugins/pixelview.c Examining data/lirc-0.10.1/plugins/zotac.c Examining data/lirc-0.10.1/plugins/alsa_usb.c Examining data/lirc-0.10.1/plugins/usbx.c Examining data/lirc-0.10.1/plugins/ftdi.c Examining data/lirc-0.10.1/plugins/uirt2.c Examining data/lirc-0.10.1/plugins/devinput.c Examining data/lirc-0.10.1/plugins/atwf83.c Examining data/lirc-0.10.1/plugins/file.c Examining data/lirc-0.10.1/daemons/lircrcd.cpp Examining data/lirc-0.10.1/daemons/lircd-uinput.cpp Examining data/lirc-0.10.1/daemons/lircmd.cpp Examining data/lirc-0.10.1/daemons/lircd.cpp Examining data/lirc-0.10.1/lib/lirc_log.h Examining data/lirc-0.10.1/lib/release.h Examining data/lirc-0.10.1/lib/lirc-utils.h Examining data/lirc-0.10.1/lib/dump_config.h Examining data/lirc-0.10.1/lib/lirc_config.h Examining data/lirc-0.10.1/lib/config_file.h Examining data/lirc-0.10.1/lib/ciniparser.h Examining data/lirc-0.10.1/lib/ir_remote_types.h Examining data/lirc-0.10.1/lib/curl_poll.c Examining data/lirc-0.10.1/lib/irrecord.h Examining data/lirc-0.10.1/lib/lirc_client.h Examining data/lirc-0.10.1/lib/serial.c Examining data/lirc-0.10.1/lib/drv_enum.h Examining data/lirc-0.10.1/lib/dictionary.h Examining data/lirc-0.10.1/lib/drv_admin.h Examining data/lirc-0.10.1/lib/line_buffer.h Examining data/lirc-0.10.1/lib/dump_config.c Examining data/lirc-0.10.1/lib/drv_enum.c Examining data/lirc-0.10.1/lib/release.c Examining data/lirc-0.10.1/lib/lirc-utils.c Examining data/lirc-0.10.1/lib/input_map.c Examining data/lirc-0.10.1/lib/lirc_options.h Examining data/lirc-0.10.1/lib/ir_remote.c Examining data/lirc-0.10.1/lib/lirc_options.c Examining data/lirc-0.10.1/lib/config_flags.h Examining data/lirc-0.10.1/lib/receive.h Examining data/lirc-0.10.1/lib/input_map.h Examining data/lirc-0.10.1/lib/serial.h Examining data/lirc-0.10.1/lib/lirc_driver.h Examining data/lirc-0.10.1/lib/transmit.c Examining data/lirc-0.10.1/lib/curl_poll.h Examining data/lirc-0.10.1/lib/lirc_client.c Examining data/lirc-0.10.1/lib/dictionary.c Examining data/lirc-0.10.1/lib/driver.h Examining data/lirc-0.10.1/lib/drv_admin.c Examining data/lirc-0.10.1/lib/line_buffer.cpp Examining data/lirc-0.10.1/lib/lirc_private.h Examining data/lirc-0.10.1/lib/receive.c Examining data/lirc-0.10.1/lib/transmit.h Examining data/lirc-0.10.1/lib/ciniparser.c Examining data/lirc-0.10.1/lib/driver.c Examining data/lirc-0.10.1/lib/lirc/lirc_log.h Examining data/lirc-0.10.1/lib/lirc/release.h Examining data/lirc-0.10.1/lib/lirc/lirc-utils.h Examining data/lirc-0.10.1/lib/lirc/dump_config.h Examining data/lirc-0.10.1/lib/lirc/lirc_config.h Examining data/lirc-0.10.1/lib/lirc/config_file.h Examining data/lirc-0.10.1/lib/lirc/ciniparser.h Examining data/lirc-0.10.1/lib/lirc/ir_remote_types.h Examining data/lirc-0.10.1/lib/lirc/irrecord.h Examining data/lirc-0.10.1/lib/lirc/lirc_client.h Examining data/lirc-0.10.1/lib/lirc/drv_enum.h Examining data/lirc-0.10.1/lib/lirc/dictionary.h Examining data/lirc-0.10.1/lib/lirc/drv_admin.h Examining data/lirc-0.10.1/lib/lirc/line_buffer.h Examining data/lirc-0.10.1/lib/lirc/paths.h Examining data/lirc-0.10.1/lib/lirc/lirc_options.h Examining data/lirc-0.10.1/lib/lirc/config_flags.h Examining data/lirc-0.10.1/lib/lirc/receive.h Examining data/lirc-0.10.1/lib/lirc/input_map.h Examining data/lirc-0.10.1/lib/lirc/serial.h Examining data/lirc-0.10.1/lib/lirc/lirc_driver.h Examining data/lirc-0.10.1/lib/lirc/curl_poll.h Examining data/lirc-0.10.1/lib/lirc/driver.h Examining data/lirc-0.10.1/lib/lirc/lirc_private.h Examining data/lirc-0.10.1/lib/lirc/transmit.h Examining data/lirc-0.10.1/lib/lirc/ir_remote.h Examining data/lirc-0.10.1/lib/lirc_log.c Examining data/lirc-0.10.1/lib/config_file.c Examining data/lirc-0.10.1/lib/ir_remote.h Examining data/lirc-0.10.1/lib/irrecord.c FINAL RESULTS: data/lirc-0.10.1/daemons/lircd.cpp:1028:20: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. if (new_socket ? chmod(lircdfile, permission) data/lirc-0.10.1/daemons/lircd.cpp:1029:10: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. : (chmod(lircdfile, s.st_mode) == -1 || chown(lircdfile, s.st_uid, s.st_gid) == -1) data/lirc-0.10.1/daemons/lircd.cpp:1029:47: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. : (chmod(lircdfile, s.st_mode) == -1 || chown(lircdfile, s.st_uid, s.st_gid) == -1) data/lirc-0.10.1/daemons/lircrcd.cpp:333:6: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. chmod(addr->sun_path, permission) : data/lirc-0.10.1/daemons/lircrcd.cpp:334:7: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. (chmod(addr->sun_path, s.st_mode) == -1 || chown(addr->sun_path, s.st_uid, s.st_gid) == -1) data/lirc-0.10.1/daemons/lircrcd.cpp:334:49: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. (chmod(addr->sun_path, s.st_mode) == -1 || chown(addr->sun_path, s.st_uid, s.st_gid) == -1) data/lirc-0.10.1/lib/drv_enum.c:316:13: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. pathlen = readlink(udev_list_entry_get_name(links), data/lirc-0.10.1/lib/lirc_log.c:120:8: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. if (chown(logfile, pw->pw_uid, pw->pw_gid) == -1) data/lirc-0.10.1/lib/serial.c:379:8: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. len = readlink(name, symlink, FILENAME_MAX); data/lirc-0.10.1/plugins/girs.c:988:3: [5] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is high; the length parameter appears to be a constant, instead of computing the number of characters left. strncat(buf, b, SMALLSTRINGSIZE - 1); data/lirc-0.10.1/daemons/lircd-uinput.cpp:350:3: [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, HELP); data/lirc-0.10.1/daemons/lircd-uinput.cpp:445:6: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. r = sscanf(line.c_str(), "%*x %x %s %s\n", &reps, button, remote); data/lirc-0.10.1/daemons/lircd.cpp:728:3: [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(groupnames, buff); data/lirc-0.10.1/daemons/lircd.cpp:1022: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(serv_addr.sun_path, lircdfile); data/lirc-0.10.1/daemons/lircd.cpp:1115:2: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. vsprintf(buffer, format_str, ap); data/lirc-0.10.1/daemons/lircd.cpp:1478: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(sim, arguments); data/lirc-0.10.1/daemons/lircd.cpp:1610:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, "1\n%s\n", VERSION); data/lirc-0.10.1/daemons/lircd.cpp:1695: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(backup, buffer); data/lirc-0.10.1/daemons/lircd.cpp:2087: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(optarg, optarg_arg); data/lirc-0.10.1/daemons/lircd.cpp:2095:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(errmsg, data/lirc-0.10.1/daemons/lircd.cpp:2103:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(errmsg, data/lirc-0.10.1/daemons/lircd.cpp:2223:5: [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, DEBUG_HELP, optarg); data/lirc-0.10.1/daemons/lircd.cpp:2277:6: [4] (shell) popen: 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. f = popen("uname -a", "r"); data/lirc-0.10.1/daemons/lircd.cpp:2350:3: [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, DEBUG_HELP, optarg); data/lirc-0.10.1/daemons/lircmd.cpp:811:3: [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, DEBUG_HELP, optarg); data/lirc-0.10.1/daemons/lircmd.cpp:853:9: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. ret = sscanf(buffer, "%*x %x %s %s\n", &rep, button, remote); data/lirc-0.10.1/daemons/lircrcd.cpp:296: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(addr->sun_path, socketname); data/lirc-0.10.1/daemons/lircrcd.cpp:449:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, "%s\n", result); data/lirc-0.10.1/daemons/lircrcd.cpp:480:2: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. vsprintf(buffer, format_str, ap); data/lirc-0.10.1/daemons/lircrcd.cpp:536: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(backup, buffer); data/lirc-0.10.1/lib/ciniparser.c:128: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(line, strstrip(input_line)); data/lirc-0.10.1/lib/ciniparser.c:140:4: [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(section, strstrip(section)); data/lirc-0.10.1/lib/ciniparser.c:141:4: [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(section, strlwc(section)); data/lirc-0.10.1/lib/ciniparser.c:148: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(key, strstrip(key)); data/lirc-0.10.1/lib/ciniparser.c:149: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(key, strlwc(key)); data/lirc-0.10.1/lib/ciniparser.c:150: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(value, strstrip(value)); data/lirc-0.10.1/lib/ciniparser.c:166: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(key, strstrip(key)); data/lirc-0.10.1/lib/ciniparser.c:167: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(key, strlwc(key)); data/lirc-0.10.1/lib/config_file.c:802: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(dst, current); data/lirc-0.10.1/lib/config_file.c:811: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(dst, child); data/lirc-0.10.1/lib/driver.c:75: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(s, options); data/lirc-0.10.1/lib/driver.c:81:11: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. If the scanf format is influenceable by an attacker, it's exploitable. found = sscanf(token, OPTION_FMT, option.key, option.value); data/lirc-0.10.1/lib/drv_admin.c:287:3: [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(file, format, names.array[i]); data/lirc-0.10.1/lib/dump_config.c:53:6: [4] (shell) popen: 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. p = popen("uname -r", "r"); data/lirc-0.10.1/lib/dump_config.c:241:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(format, " %%-24s 0x%%0%dllX", data/lirc-0.10.1/lib/dump_config.c:243:3: [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(f, format, codes->name, codes->code); data/lirc-0.10.1/lib/dump_config.c:246: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(f, format, loop->code); data/lirc-0.10.1/lib/irrecord.c:102: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(state->message, sizeof(state->message), fmt, ap); data/lirc-0.10.1/lib/lirc-utils.c:73:3: [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(groupnames, buff); data/lirc-0.10.1/lib/lirc_client.c:53:42: [4] (format) syslog: If syslog's format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant format string for syslog. #define logprintf(level, fmt, args ...) syslog(level, fmt, ## args) data/lirc-0.10.1/lib/lirc_client.c:117:6: [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. n = vsnprintf(ctx->packet, PACKET_SIZE, fmt, ap); data/lirc-0.10.1/lib/lirc_client.c:330:2: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, format_str, ap); data/lirc-0.10.1/lib/lirc_client.c:807: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(path, R_OK) != 0) data/lirc-0.10.1/lib/lirc_client.c:826: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(filename, "/" LIRCRC_USER_FILE); data/lirc-0.10.1/lib/lirc_client.c:833:3: [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(filename, file + 1); data/lirc-0.10.1/lib/lirc_client.c:855:3: [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(filename, file); data/lirc-0.10.1/lib/lirc_client.c:1495:8: [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. ret = system(command); data/lirc-0.10.1/lib/lirc_client.c:1938: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(buf, size, VARRUNDIR "/%d-%s-lircrcd.socket", getuid(), id); data/lirc-0.10.1/lib/lirc_client.c:2068: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(addr_un.sun_path, socket_path); data/lirc-0.10.1/lib/lirc_log.c:260: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(buff, sizeof(buff), format, ap); data/lirc-0.10.1/lib/lirc_log.c:297:3: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(lf, format_str, ap); data/lirc-0.10.1/lib/lirc_log.c:316:2: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(s, sizeof(s), fmt, ap); data/lirc-0.10.1/lib/lirc_log.c:353: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(buffer, F_OK) != 0) { data/lirc-0.10.1/lib/lirc_options.c:100:15: [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 (path && access(path, R_OK) != 0) { data/lirc-0.10.1/lib/lirc_options.c:138: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(path, R_OK) == 0) { data/lirc-0.10.1/lib/serial.c:313: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(filename, LIRC_LOCKDIR "/LCK.."); data/lirc-0.10.1/lib/serial.c:325: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(filename, s); data/lirc-0.10.1/lib/serial.c:407:4: [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(dirname, name); data/lirc-0.10.1/lib/serial.c:463:4: [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(filename, LIRC_LOCKDIR "/"); data/lirc-0.10.1/lib/serial.c:468: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(filename, ep->d_name); data/lirc-0.10.1/plugins/bte.c:121:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(prev_cmd, "AT%s\r", str); data/lirc-0.10.1/plugins/default.c:142: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(path, F_OK) != 0) { data/lirc-0.10.1/plugins/default.c:147: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(path, F_OK) != 0) { data/lirc-0.10.1/plugins/default.c:222:7: [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(device, R_OK | W_OK) != 0) data/lirc-0.10.1/plugins/devinput.c:307:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(devname, "/dev/input/%s", obj->d_name); data/lirc-0.10.1/plugins/file.c:127: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(line, sizeof(line), close_msg, lineno); data/lirc-0.10.1/plugins/file.c:266:4: [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(buff, sizeof(buff), open_msg, opt->value); data/lirc-0.10.1/plugins/girs.c:710:7: [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(drv.device, R_OK) != 0) { data/lirc-0.10.1/plugins/irtoy.c:432: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(drv.device, R_OK) != 0) { data/lirc-0.10.1/python-pkg/lirc/_client.c:59: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(path, R_OK) != 0) { data/lirc-0.10.1/tools/irexec.cpp:84:4: [4] (shell) execvp: 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. execvp(SH_PATH, vp); data/lirc-0.10.1/tools/irpty.cpp:64:2: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, args); data/lirc-0.10.1/tools/irpty.cpp:256: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(slave_name, pts_name); data/lirc-0.10.1/tools/irpty.cpp:392:7: [4] (shell) execvp: 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. if (execvp(argv[optind], &argv[optind]) < 0) data/lirc-0.10.1/tools/irrecord-ui.cpp:655:3: [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, data/lirc-0.10.1/tools/irrecord-ui.cpp:1116:7: [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(path, F_OK) == 0) { data/lirc-0.10.1/tools/irrecord-ui.cpp:1127:22: [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 (opts->update && access(opts->filename, F_OK) == 0) { data/lirc-0.10.1/tools/irrecord-ui.cpp:1130:7: [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. if (system(buff) != 0) data/lirc-0.10.1/tools/irrecord-ui.cpp:1191: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(opts.tmpfile, F_OK) == 0 && unlink(opts.tmpfile) != 0) { data/lirc-0.10.1/tools/irsend.cpp:191:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, "%s %s", directive, code); data/lirc-0.10.1/tools/irsend.cpp:199:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer + strlen(buffer), " %s", code); data/lirc-0.10.1/tools/irsimreceive.cpp:87: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(path, R_OK) != 0) { data/lirc-0.10.1/tools/irsimsend.cpp:153:30: [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 (opt_listfile != NULL && access(opt_listfile, R_OK) != 0) { data/lirc-0.10.1/tools/irtestcase.cpp:108: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(LOGDIR, F_OK) != 0) { data/lirc-0.10.1/tools/irw.cpp:82: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(addr.sun_path, LIRCD); data/lirc-0.10.1/tools/irxevent.cpp:553:11: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. if (2 != sscanf(s, "Key %s Focus %s %s", buffer, buffer, buffer) && data/lirc-0.10.1/tools/irxevent.cpp:554:11: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. 2 != sscanf(s, "Key %s WindowID %i %s", buffer, &d, buffer) && data/lirc-0.10.1/tools/irxevent.cpp:555:11: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. 2 != sscanf(s, "Key %s Focus WindowID %i %s", buffer, &d, buffer) && data/lirc-0.10.1/tools/irxevent.cpp:556:11: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. 2 != sscanf(s, "Key %s %s %s", buffer, buffer, buffer) && data/lirc-0.10.1/tools/irxevent.cpp:557:11: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. 4 != sscanf(s, "Button %d %d %d Focus %s %s", &d, &d, &d, buffer, buffer) && data/lirc-0.10.1/tools/irxevent.cpp:558:11: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. 4 != sscanf(s, "Button %d %d %d WindowID %i %s", &d, &d, &d, &d, buffer) && data/lirc-0.10.1/tools/irxevent.cpp:559:11: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. 4 != sscanf(s, "Button %d %d %d Focus WindowID %i %s", &d, &d, &d, &d, buffer) && data/lirc-0.10.1/tools/irxevent.cpp:560:11: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. 4 != sscanf(s, "Button %d %d %d %s %s", &d, &d, &d, buffer, buffer) && data/lirc-0.10.1/tools/irxevent.cpp:561:11: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. 4 != sscanf(s, "xy_Key %d %d %s Focus %s %s", &d, &d, buffer, buffer, buffer) && data/lirc-0.10.1/tools/irxevent.cpp:562:11: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. 4 != sscanf(s, "xy_Key %d %d %s WindowID %i %s", &d, &d, buffer, &d, buffer) && data/lirc-0.10.1/tools/irxevent.cpp:563:11: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. 4 != sscanf(s, "xy_Key %d %d %s Focus WindowID %i %s", &d, &d, buffer, &d, buffer) && data/lirc-0.10.1/tools/irxevent.cpp:564:11: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. 4 != sscanf(s, "xy_Key %d %d %s %s", &d, &d, buffer, buffer)) { data/lirc-0.10.1/tools/irxevent.cpp:652:14: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. if (2 == sscanf(c, "Key %s Focus WindowID %i", keyname, &WindowID) || data/lirc-0.10.1/tools/irxevent.cpp:655:17: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. || 4 == sscanf(c, "xy_Key %d %d %s Focus WindowID %i", &pointer_x, &pointer_y, data/lirc-0.10.1/tools/irxevent.cpp:657:17: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. || 2 == sscanf(c, "Key %s Focus %s", keyname, windowname) data/lirc-0.10.1/tools/irxevent.cpp:658:17: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. || 4 == sscanf(c, "Button %d %d %d Focus %s", &pointer_button, &pointer_x, data/lirc-0.10.1/tools/irxevent.cpp:660:17: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. || 4 == sscanf(c, "xy_Key %d %d %s Focus %s", &pointer_x, &pointer_y, keyname, data/lirc-0.10.1/tools/irxevent.cpp:684:21: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. } else if (2 == sscanf(c, "Key %s WindowID %i", keyname, &WindowID) || data/lirc-0.10.1/tools/irxevent.cpp:687:17: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. || 4 == sscanf(c, "xy_Key %d %d %s WindowID %i", &pointer_x, &pointer_y, data/lirc-0.10.1/tools/irxevent.cpp:691:21: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. } else if (2 == sscanf(c, "Key %s %s", keyname, windowname) || data/lirc-0.10.1/tools/irxevent.cpp:692:14: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. 4 == sscanf(c, "Button %d %d %d %s", &pointer_button, &pointer_x, &pointer_y, data/lirc-0.10.1/tools/irxevent.cpp:694:17: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. || 4 == sscanf(c, "xy_Key %d %d %s %s\n", &pointer_x, &pointer_y, keyname, data/lirc-0.10.1/tools/lirc-lsplugins.cpp:180: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(buff, arg); data/lirc-0.10.1/tools/lirc-lsplugins.cpp:421:2: [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. printf(YAML_HEADER, VERSION, ctime(&now)); data/lirc-0.10.1/tools/lirc-lsremotes.cpp:74: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(pattern, R_OK) == 0) data/lirc-0.10.1/tools/lirc-lsremotes.cpp:102:7: [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(try_buff, R_OK) != 0) data/lirc-0.10.1/daemons/lircd-uinput.cpp:189:6: [3] (buffer) getopt_long: 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. c = getopt_long(argc, argv, optstring, cli_options, NULL); data/lirc-0.10.1/daemons/lircd-uinput.cpp:226:7: [3] (buffer) getopt_long: 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. c = getopt_long(argc, argv, optstring, cli_options, NULL); data/lirc-0.10.1/daemons/lircd.cpp:2170:14: [3] (buffer) getopt_long: 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_long(argc, argv, optstring, lircd_options, NULL)) data/lirc-0.10.1/daemons/lircmd.cpp:777:14: [3] (buffer) getopt_long: 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_long(argc, argv, optstring, lircmd_options, NULL)) data/lirc-0.10.1/daemons/lircrcd.cpp:659:7: [3] (buffer) getopt_long: 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. c = getopt_long(argc, argv, "hvp:o:", long_options, NULL); data/lirc-0.10.1/lib/drv_admin.c:201: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. getenv(PLUGINDIR_VAR)); data/lirc-0.10.1/lib/lirc-utils.c:41: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. user = getenv("SUDO_USER"); data/lirc-0.10.1/lib/lirc_client.c:778: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. home = getenv("HOME"); data/lirc-0.10.1/lib/lirc_client.c:796: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("XDG_CONFIG_HOME") != NULL) { data/lirc-0.10.1/lib/lirc_client.c:798:17: [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. strncpy(path, getenv("XDG_CONFIG_HOME"), MAXPATHLEN); data/lirc-0.10.1/lib/lirc_client.c:2059: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. socket_path = path ? path : getenv("LIRC_SOCKET_PATH"); data/lirc-0.10.1/lib/lirc_log.c:116:7: [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("SUDO_USER") != NULL && geteuid() == 0) { data/lirc-0.10.1/lib/lirc_log.c:117:11: [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. user = getenv("SUDO_USER"); data/lirc-0.10.1/lib/lirc_log.c:126: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("LIRC_LOGCHANNEL") != NULL) { data/lirc-0.10.1/lib/lirc_log.c:127: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. logged_channels = atoi(getenv("LIRC_LOGCHANNEL")); // FIXME... data/lirc-0.10.1/lib/lirc_log.c:223: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* const level = getenv("LIRC_LOGLEVEL"); data/lirc-0.10.1/lib/lirc_log.c:339: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("XDG_CACHE_HOME") != NULL) { data/lirc-0.10.1/lib/lirc_log.c:340:19: [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. strncpy(buffer, getenv("XDG_CACHE_HOME"), size); data/lirc-0.10.1/lib/lirc_log.c:342:13: [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. } else if (getenv("SUDO_USER") != NULL && geteuid() == 0) { data/lirc-0.10.1/lib/lirc_log.c:343:10: [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. user = getenv("SUDO_USER"); data/lirc-0.10.1/lib/lirc_log.c:349:10: [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 = getenv("HOME"); data/lirc-0.10.1/lib/lirc_options.c:129:10: [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. path = getenv(LIRC_OPTIONS_VAR); data/lirc-0.10.1/lib/lirc_options.c:152:19: [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. options_debug = getenv(LIRC_DEBUG_OPTIONS) != NULL; data/lirc-0.10.1/lib/lirc_options.c:166: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. s = getenv("LIRC_LOGLEVEL"); data/lirc-0.10.1/tools/ircat.cpp:71:7: [3] (buffer) getopt_long: 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. c = getopt_long(argc, argv, "c:hv", long_options, NULL); data/lirc-0.10.1/tools/irexec.cpp:154:14: [3] (buffer) getopt_long: 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_long(argc, argv, "D:hvdn:", options, NULL)) != -1) { data/lirc-0.10.1/tools/irpipe.cpp:78:7: [3] (buffer) getopt_long: 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. c = getopt_long(argc, argv, optstring, options, NULL); data/lirc-0.10.1/tools/irpty.cpp:327:14: [3] (buffer) getopt_long: 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_long(argc, argv, "hVs:einv", long_options, NULL)) data/lirc-0.10.1/tools/irrecord-ui.cpp:327:14: [3] (buffer) getopt_long: 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_long(argc, argv, optstring, long_options, NULL)) data/lirc-0.10.1/tools/irsend.cpp:115:7: [3] (buffer) getopt_long: 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. c = getopt_long(argc, argv, "hvd:a:#:", long_options, NULL); data/lirc-0.10.1/tools/irsend.cpp:177:27: [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. lircd = lircd ? lircd : getenv("LIRC_SOCKET_PATH"); data/lirc-0.10.1/tools/irsimreceive.cpp:26:18: [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* s = getenv("LIRC_PLUGIN_PATH"); data/lirc-0.10.1/tools/irsimreceive.cpp:56:14: [3] (buffer) getopt_long: 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_long(argc, argv, "hvU:", options, NULL)) data/lirc-0.10.1/tools/irsimsend.cpp:73:18: [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* s = getenv("LIRC_PLUGIN_PATH"); data/lirc-0.10.1/tools/irsimsend.cpp:99:14: [3] (buffer) getopt_long: 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_long(argc, argv, "c:hk:l:s:U:v", options, NULL)) data/lirc-0.10.1/tools/irtestcase.cpp:212:14: [3] (buffer) getopt_long: 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_long(argc, argv, "hl:p:t:v", opts, NULL)) != EOF) { data/lirc-0.10.1/tools/irtestcase.cpp:251:41: [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. socketpath = socketpath ? socketpath : getenv("LIRC_SOCKET_PATH"); data/lirc-0.10.1/tools/irw.cpp:63:14: [3] (buffer) getopt_long: 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_long(argc, argv, "hv", long_options, NULL)) data/lirc-0.10.1/tools/irxevent.cpp:590:14: [3] (buffer) getopt_long: 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_long(argc, argv, "dhV", long_options, NULL)) != EOF) { data/lirc-0.10.1/tools/lirc-lsplugins.cpp:470: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(PLUGINDIR_VAR) != NULL) data/lirc-0.10.1/tools/lirc-lsplugins.cpp:471:16: [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. pluginpath = getenv(PLUGINDIR_VAR); data/lirc-0.10.1/tools/lirc-lsplugins.cpp:472:14: [3] (buffer) getopt_long: 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_long(argc, argv, data/lirc-0.10.1/tools/lirc-lsremotes.cpp:274:14: [3] (buffer) getopt_long: 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_long(argc, argv, "shdv", options, NULL)) != EOF) { data/lirc-0.10.1/tools/mode2.cpp:123:32: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char* const env_level = getenv("LIRC_LOGLEVEL"); data/lirc-0.10.1/tools/mode2.cpp:159:14: [3] (buffer) getopt_long: 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_long(argc, argv, optstring, options, NULL)) != -1) { data/lirc-0.10.1/tools/xmode2.cpp:188:14: [3] (buffer) getopt_long: 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_long(argc, argv, optstring, options, NULL)) != -1) { data/lirc-0.10.1/daemons/lircd-uinput.cpp: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 level[4]; data/lirc-0.10.1/daemons/lircd-uinput.cpp:241:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buff[128]; data/lirc-0.10.1/daemons/lircd-uinput.cpp:243:6: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen(path, "r"); data/lirc-0.10.1/daemons/lircd-uinput.cpp:266: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 optbuff[64]; data/lirc-0.10.1/daemons/lircd-uinput.cpp:441: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 button[PACKET_SIZE + 1]; data/lirc-0.10.1/daemons/lircd-uinput.cpp:442: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 remote[PACKET_SIZE + 1]; data/lirc-0.10.1/daemons/lircd-uinput.cpp:490: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. char buffer[PACKET_SIZE + 1]; data/lirc-0.10.1/daemons/lircd-uinput.cpp:555: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(opts->uinput_path, O_RDWR); data/lirc-0.10.1/daemons/lircd-uinput.cpp:588: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). fd = open(path, O_RDONLY); data/lirc-0.10.1/daemons/lircd.cpp:527:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = fopen(filename, "r"); data/lirc-0.10.1/daemons/lircd.cpp:532:8: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = fopen(LIRCDOLDCFGFILE, "r"); data/lirc-0.10.1/daemons/lircd.cpp:688: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 groupnames[256] = {0}; data/lirc-0.10.1/daemons/lircd.cpp:689: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 buff[12]; data/lirc-0.10.1/daemons/lircd.cpp:791: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 server[strlen(server_arg) + 1]; data/lirc-0.10.1/daemons/lircd.cpp:843: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 service[64]; data/lirc-0.10.1/daemons/lircd.cpp:902: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[PACKET_SIZE + 1]; data/lirc-0.10.1/daemons/lircd.cpp:952: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(pidfile, O_RDWR | O_CREAT, 0644); data/lirc-0.10.1/daemons/lircd.cpp:1107: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 lines[16], buffer[PACKET_SIZE + 1]; data/lirc-0.10.1/daemons/lircd.cpp:1112: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 buffer2[PACKET_SIZE + 2]; data/lirc-0.10.1/daemons/lircd.cpp:1135:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(lines, "%d\n", n); data/lirc-0.10.1/daemons/lircd.cpp:1274: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[PACKET_SIZE + 1]; data/lirc-0.10.1/daemons/lircd.cpp:1292:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buffer, "%d\n", n); data/lirc-0.10.1/daemons/lircd.cpp:1300:10: [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. len = sprintf(buffer, "name_too_long\n"); data/lirc-0.10.1/daemons/lircd.cpp:1311: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[PACKET_SIZE + 1]; data/lirc-0.10.1/daemons/lircd.cpp:1329:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buffer, "%d\n", n); data/lirc-0.10.1/daemons/lircd.cpp:1337:10: [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. len = sprintf(buffer, "code_too_long\n"); data/lirc-0.10.1/daemons/lircd.cpp:1347: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[PACKET_SIZE + 1]; data/lirc-0.10.1/daemons/lircd.cpp:1356:9: [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. len = sprintf(buffer, "1\ncode_too_long\n"); data/lirc-0.10.1/daemons/lircd.cpp:1608: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[PACKET_SIZE + 1]; data/lirc-0.10.1/daemons/lircd.cpp:1643: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 buff[128]; data/lirc-0.10.1/daemons/lircd.cpp:1661:6: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen(buff, "w"); data/lirc-0.10.1/daemons/lircd.cpp:1676: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[PACKET_SIZE + 1], backup[PACKET_SIZE + 1]; data/lirc-0.10.1/daemons/lircd.cpp:2085: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 optarg[strlen(optarg_arg) + 1]; data/lirc-0.10.1/daemons/lircd.cpp:2114: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 level[4]; data/lirc-0.10.1/daemons/lircd.cpp:2147: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 buff[256]; data/lirc-0.10.1/daemons/lircd.cpp:2274: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 buff [256]; data/lirc-0.10.1/daemons/lircd.cpp:2291: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 buff[128]; data/lirc-0.10.1/daemons/lircd.cpp:2340: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 errmsg[128]; data/lirc-0.10.1/daemons/lircmd.cpp:235:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = fopen(configfile, "r"); data/lirc-0.10.1/daemons/lircmd.cpp:269: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/input/uinput", O_RDWR); data/lirc-0.10.1/daemons/lircmd.cpp:271: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). fd = open("/dev/uinput", O_RDWR); data/lirc-0.10.1/daemons/lircmd.cpp:273:9: [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/misc/uinput", O_RDWR); data/lirc-0.10.1/daemons/lircmd.cpp:338: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[5]; data/lirc-0.10.1/daemons/lircmd.cpp:590: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[PACKET_SIZE]; data/lirc-0.10.1/daemons/lircmd.cpp:660:24: [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). new_ms.acc_start = atoi(number); data/lirc-0.10.1/daemons/lircmd.cpp:663: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). new_ms.acc_max = atoi(number); data/lirc-0.10.1/daemons/lircmd.cpp:666: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). new_ms.acc_fak = atoi(number); data/lirc-0.10.1/daemons/lircmd.cpp:746: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 level[4]; data/lirc-0.10.1/daemons/lircmd.cpp:826: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[PACKET_SIZE + 1]; data/lirc-0.10.1/daemons/lircmd.cpp:828: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 button[PACKET_SIZE + 1]; data/lirc-0.10.1/daemons/lircmd.cpp:829: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 remote[PACKET_SIZE + 1]; data/lirc-0.10.1/daemons/lircmd.cpp:914: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). lircm = open(LIRCM, O_RDWR | O_NONBLOCK); data/lirc-0.10.1/daemons/lircmd.cpp:926:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = fopen(filename, "r"); data/lirc-0.10.1/daemons/lircmd.cpp:931:8: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = fopen(filename, "r"); data/lirc-0.10.1/daemons/lircrcd.cpp:447: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[strlen(result) + 1 + 1]; data/lirc-0.10.1/daemons/lircrcd.cpp:473: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 lines[12], buffer[PACKET_SIZE + 1]; data/lirc-0.10.1/daemons/lircrcd.cpp:501:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(lines, "%d\n", n); data/lirc-0.10.1/daemons/lircrcd.cpp:517: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[PACKET_SIZE + 1], backup[PACKET_SIZE + 1]; data/lirc-0.10.1/daemons/lircrcd.cpp:647: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 dir[FILENAME_MAX + 1] = { 0 }; data/lirc-0.10.1/lib/ciniparser.c:66: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 l[ASCIILINESZ + 1]; data/lirc-0.10.1/lib/ciniparser.c:92: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 l[ASCIILINESZ + 1]; data/lirc-0.10.1/lib/ciniparser.c:125:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char line[ASCIILINESZ + 1]; data/lirc-0.10.1/lib/ciniparser.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 keym[ASCIILINESZ + 1]; data/lirc-0.10.1/lib/ciniparser.c:371:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char line[ASCIILINESZ + 1]; data/lirc-0.10.1/lib/ciniparser.c:372: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 section[ASCIILINESZ + 1]; data/lirc-0.10.1/lib/ciniparser.c:373: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 key[ASCIILINESZ + 1]; data/lirc-0.10.1/lib/ciniparser.c:374: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 tmp[ASCIILINESZ + 1]; data/lirc-0.10.1/lib/ciniparser.c:375: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 val[ASCIILINESZ + 1]; data/lirc-0.10.1/lib/ciniparser.c:379:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). in = fopen(ininame, "r"); data/lirc-0.10.1/lib/config_file.c:141: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((ar->ptr) + (ar->item_size * ar->nr_items), dataptr, ar->item_size); data/lirc-0.10.1/lib/config_file.c:876:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). childFile = fopen(childName, "r"); data/lirc-0.10.1/lib/config_file.c:907: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 buff[256] = { '\0' }; data/lirc-0.10.1/lib/config_file.c:942: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[LINE_LEN + 1]; data/lirc-0.10.1/lib/dictionary.c:67: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(newptr, ptr, size); data/lirc-0.10.1/lib/driver.c:39: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 buff[128]; data/lirc-0.10.1/lib/driver.h:64: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 key[32]; data/lirc-0.10.1/lib/driver.h:65: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 value[64]; data/lirc-0.10.1/lib/drv_admin.c:163: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[1024]; data/lirc-0.10.1/lib/drv_admin.c:164: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 buff[1024]; data/lirc-0.10.1/lib/drv_admin.c:276: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 format[16]; data/lirc-0.10.1/lib/drv_admin.c:302: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(&drv, &drv_null, sizeof(struct driver)); data/lirc-0.10.1/lib/drv_admin.c:311: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(&drv, found, sizeof(struct driver)); data/lirc-0.10.1/lib/drv_enum.c:84: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 dev_id[64]; data/lirc-0.10.1/lib/drv_enum.c:133:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char line[256]; data/lirc-0.10.1/lib/drv_enum.c:169: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(oldbuf, &newbuf, sizeof(glob_t)); data/lirc-0.10.1/lib/drv_enum.c:227: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 device_path[2 * MAXPATHLEN + 32]; data/lirc-0.10.1/lib/drv_enum.c:305: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 buff[128]; data/lirc-0.10.1/lib/drv_enum.c:306: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[128]; data/lirc-0.10.1/lib/drv_enum.c:369: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 buff[128]; data/lirc-0.10.1/lib/dump_config.c:49: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 cmd[128]; data/lirc-0.10.1/lib/dump_config.c:50: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 uname[64]; data/lirc-0.10.1/lib/dump_config.c:55:3: [2] (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 string. strcat(uname, "Cannot run uname -r(!)"); data/lirc-0.10.1/lib/dump_config.c:58:4: [2] (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 string. strcat(uname, "Cannot run uname -r (!)"); data/lirc-0.10.1/lib/dump_config.c:238: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 format[64]; data/lirc-0.10.1/lib/dump_config.c:244:3: [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(format, " 0x%%0%dlX", (rem->bits + 3) / 4); data/lirc-0.10.1/lib/ir_remote.c:80:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(new_ncode, ncode, sizeof(struct ir_ncode)); data/lirc-0.10.1/lib/ir_remote.c:87: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(new_ncode->signals, ncode->signals, signal_size); data/lirc-0.10.1/lib/ir_remote.c:94: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(new_node, node, sizeof(struct ir_code_node)); data/lirc-0.10.1/lib/ir_remote.c:736: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 message[PACKET_SIZE + 1]; data/lirc-0.10.1/lib/irrecord.c:142: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[PACKET_SIZE]; data/lirc-0.10.1/lib/irrecord.c:1792:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((void*)curr_driver, &hw_emulation, sizeof(struct driver)); data/lirc-0.10.1/lib/irrecord.c:1793:6: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen(opts->filename, "r"); data/lirc-0.10.1/lib/irrecord.c:2043:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen(opts->tmpfile, "r"); data/lirc-0.10.1/lib/irrecord.c:2043:19: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). f = fopen(opts->tmpfile, "r"); data/lirc-0.10.1/lib/irrecord.c:2104:16: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). state->fout = fopen(opts->tmpfile, "w"); data/lirc-0.10.1/lib/irrecord.c:2104:28: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). state->fout = fopen(opts->tmpfile, "w"); data/lirc-0.10.1/lib/irrecord.c:2106:50: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). log_error("Could not open new config file %s", tmpfile); data/lirc-0.10.1/lib/irrecord.c:2121:16: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). state->fout = fopen(opts->filename, "w"); data/lirc-0.10.1/lib/irrecord.h:167:14: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). const char* tmpfile; data/lirc-0.10.1/lib/irrecord.h:172: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 commandline[128]; data/lirc-0.10.1/lib/irrecord.h:240: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 message[128]; data/lirc-0.10.1/lib/irrecord.h:242: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[BUTTON]; data/lirc-0.10.1/lib/lirc-utils.c:34: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 groupnames[256] = {0}; data/lirc-0.10.1/lib/lirc-utils.c:35: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 buff[12]; data/lirc-0.10.1/lib/lirc/driver.h:64: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 key[32]; data/lirc-0.10.1/lib/lirc/driver.h:65: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 value[64]; data/lirc-0.10.1/lib/lirc/irrecord.h:167:14: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). const char* tmpfile; data/lirc-0.10.1/lib/lirc/irrecord.h:172: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 commandline[128]; data/lirc-0.10.1/lib/lirc/irrecord.h:240: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 message[128]; data/lirc-0.10.1/lib/lirc/irrecord.h:242: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[BUTTON]; data/lirc-0.10.1/lib/lirc/lirc_client.h:189: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 packet[PACKET_SIZE + 1]; /**< The packet to send. */ data/lirc-0.10.1/lib/lirc/lirc_client.h:190: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[PACKET_SIZE + 1]; /**< Reply IO buffer. */ data/lirc-0.10.1/lib/lirc/lirc_client.h: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 reply[PACKET_SIZE + 1]; /**< Command reply payload. */ data/lirc-0.10.1/lib/lirc/lirc_log.h:76: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. extern char progname[128]; data/lirc-0.10.1/lib/lirc_client.c:853: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(filename, current_file, pathlen); data/lirc-0.10.1/lib/lirc_client.c:872:8: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fin = fopen(filename, "r"); data/lirc-0.10.1/lib/lirc_client.c:880:9: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fin = fopen(root_file, "r"); data/lirc-0.10.1/lib/lirc_client.c:885:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fin = fopen(root_file, "r"); data/lirc-0.10.1/lib/lirc_client.c:1050: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 my_path[128]; data/lirc-0.10.1/lib/lirc_client.c:1086: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 lircrc_class[128] = { '\0' }; data/lirc-0.10.1/lib/lirc_client.c:1452: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 command[128]; data/lirc-0.10.1/lib/lirc_client.c:1814: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 static_buff[PACKET_SIZE]; data/lirc-0.10.1/lib/lirc_client.c:1947: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 static_buff[PACKET_SIZE]; data/lirc-0.10.1/lib/lirc_client.c:1969: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 static_buff[PACKET_SIZE]; data/lirc-0.10.1/lib/lirc_client.c:2080: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 service[64]; data/lirc-0.10.1/lib/lirc_client.h:189: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 packet[PACKET_SIZE + 1]; /**< The packet to send. */ data/lirc-0.10.1/lib/lirc_client.h:190: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[PACKET_SIZE + 1]; /**< Reply IO buffer. */ data/lirc-0.10.1/lib/lirc_client.h: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 reply[PACKET_SIZE + 1]; /**< Command reply payload. */ data/lirc-0.10.1/lib/lirc_log.c:44: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 hostname[HOSTNAME_LEN + 1]; data/lirc-0.10.1/lib/lirc_log.c:56: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 progname[128] = { '?', '\0' }; data/lirc-0.10.1/lib/lirc_log.c:109:8: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). lf = fopen(logfile, "a"); data/lirc-0.10.1/lib/lirc_log.c:127: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). logged_channels = atoi(getenv("LIRC_LOGCHANNEL")); // FIXME... data/lirc-0.10.1/lib/lirc_log.c:164:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). lf = fopen(logfile, "a"); data/lirc-0.10.1/lib/lirc_log.c:204: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 label[128]; data/lirc-0.10.1/lib/lirc_log.c:256: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 buff[256]; data/lirc-0.10.1/lib/lirc_log.c:277: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 buff[PRIO_LEN + strlen(format_str)]; data/lirc-0.10.1/lib/lirc_log.c:312:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s[256]; data/lirc-0.10.1/lib/lirc_log.c:359:4: [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(buffer, "/tmp"); data/lirc-0.10.1/lib/lirc_log.c:373: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 str[1024]; data/lirc-0.10.1/lib/lirc_log.c:388: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(str + pos, "%02x ", buf[i]); data/lirc-0.10.1/lib/lirc_log.h:76: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. extern char progname[128]; data/lirc-0.10.1/lib/lirc_options.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 s[4]; data/lirc-0.10.1/lib/lirc_options.c:115: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 buff[128]; data/lirc-0.10.1/lib/lirc_options.c:116: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 buff2[128]; data/lirc-0.10.1/lib/lirc_options.c:164: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 buff[64]; data/lirc-0.10.1/lib/receive.c:243: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 buffer[curr_driver->code_length/CHAR_BIT + 1]; data/lirc-0.10.1/lib/release.c:48:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char message[PACKET_SIZE + 1]; data/lirc-0.10.1/lib/serial.c:304: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 filename[FILENAME_MAX + 1]; data/lirc-0.10.1/lib/serial.c:305: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 symlink[FILENAME_MAX + 1]; data/lirc-0.10.1/lib/serial.c:306: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 cwd[FILENAME_MAX + 1]; data/lirc-0.10.1/lib/serial.c:309: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[10 + 1 + 1]; data/lirc-0.10.1/lib/serial.c:333:9: [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). lock = open(filename, O_CREAT | O_EXCL | O_WRONLY, 0644); data/lirc-0.10.1/lib/serial.c:336: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). lock = open(filename, O_RDONLY); data/lirc-0.10.1/lib/serial.c:394: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 dirname[FILENAME_MAX + 1]; data/lirc-0.10.1/lib/serial.c:451:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char id[20] = { '\0' }; data/lirc-0.10.1/lib/serial.c:452: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 filename[FILENAME_MAX + 1]; data/lirc-0.10.1/lib/serial.c:475: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). lock = open(filename, O_RDONLY); data/lirc-0.10.1/plugins/accent.c:95:17: [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 b[ACCENT_MAX_READ_BYTES]; data/lirc-0.10.1/plugins/accent.c:357: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(device, O_RDWR | O_NONBLOCK | O_NOCTTY | O_SYNC); data/lirc-0.10.1/plugins/alsa_usb.c:62:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[36]; data/lirc-0.10.1/plugins/alsa_usb.c:68: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 ctl_name[20]; data/lirc-0.10.1/plugins/alsa_usb.c:72:3: [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(ctl_name, "hw:CARD=%d", card); data/lirc-0.10.1/plugins/alsa_usb.c:82:5: [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(name, "hw:CARD=%d,DEV=%d", card, device); data/lirc-0.10.1/plugins/alsa_usb.c:113: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 my_device[36]; data/lirc-0.10.1/plugins/atilibusb.c:46:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char device_path[10000] = {0}; data/lirc-0.10.1/plugins/atilibusb.c:336: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[CODE_BYTES]; data/lirc-0.10.1/plugins/atwf83.c:137:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd_hidraw = open(drv.device, O_RDONLY); data/lirc-0.10.1/plugins/audio.c:79:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char ptyName[256]; data/lirc-0.10.1/plugins/audio.c:452: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 api[1024]; data/lirc-0.10.1/plugins/audio.c:453: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 device[1024]; data/lirc-0.10.1/plugins/audio.c:630: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 device_path[256]; data/lirc-0.10.1/plugins/audio.c:632: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 buff[256]; data/lirc-0.10.1/plugins/audio_alsa.c:165: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 tmp_name[20]; data/lirc-0.10.1/plugins/audio_alsa.c:174: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(tmp_name, "/tmp/lircXXXXXX"); data/lirc-0.10.1/plugins/audio_alsa.c:175: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_name); data/lirc-0.10.1/plugins/audio_alsa.c:188: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). drv.fd = open(tmp_name, O_RDWR); data/lirc-0.10.1/plugins/audio_alsa.c:200: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). alsa_hw.fd = open(tmp_name, O_RDWR | O_NONBLOCK); data/lirc-0.10.1/plugins/audio_alsa.c:236: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). rate = atoi(pcm_rate); data/lirc-0.10.1/plugins/audio_alsa.c:337: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 buff[READ_BUFFER_SIZE]; data/lirc-0.10.1/plugins/audio_alsa.c:540: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 device_path[256]; data/lirc-0.10.1/plugins/awlibusb.c:61:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char device_path[10000] = {0}; data/lirc-0.10.1/plugins/awlibusb.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 buf[AWUSB_RECEIVE_BYTES]; data/lirc-0.10.1/plugins/awlibusb.c:387: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(&time_last, &time_current, sizeof(struct timeval)); data/lirc-0.10.1/plugins/bte.c:110:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char prev_cmd[PACKET_SIZE + 1]; data/lirc-0.10.1/plugins/bte.c:145: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). drv.fd = open(drv.device, O_RDWR | O_NOCTTY); data/lirc-0.10.1/plugins/bte.c:183: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). drv.fd = open("/dev/zero", O_RDONLY); data/lirc-0.10.1/plugins/bte.c:218: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 msg[PACKET_SIZE + 1]; data/lirc-0.10.1/plugins/commandir.c:207: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 numBytes[2]; data/lirc-0.10.1/plugins/commandir.c:261: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 commandir_tx_start[MAX_TX_TIMERS * 4]; data/lirc-0.10.1/plugins/commandir.c:262: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 commandir_tx_end[MAX_TX_TIMERS * 4]; data/lirc-0.10.1/plugins/commandir.c:264: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 tx_timer_to_channel_map[MAX_TX_TIMERS]; data/lirc-0.10.1/plugins/commandir.c:270: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 jack_status[4]; data/lirc-0.10.1/plugins/commandir.c:432:17: [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 commandir_data_buffer[512]; data/lirc-0.10.1/plugins/commandir.c:444: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 rx_char[3] = { 3, 0, RXDECODE_HEADER_LIRC }; data/lirc-0.10.1/plugins/commandir.c:457: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 init_char[3] = { 3, 0, INIT_HEADER_LIRC }; data/lirc-0.10.1/plugins/commandir.c:513: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 deinit_char[3] = { 3, 0, DEINIT_HEADER_LIRC }; data/lirc-0.10.1/plugins/commandir.c:562: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 cmdir_char[70]; data/lirc-0.10.1/plugins/commandir.c:586: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(&send_signals[4], signals, sizeof(lirc_t) * length); data/lirc-0.10.1/plugins/commandir.c:1219: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 rx_decode_led[7] = { 7, PROC_SET, 0x40, 0, 0, 4, 2 }; data/lirc-0.10.1/plugins/commandir.c:1220: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 init_led[7] = { 7, PROC_SET, 0x00, 0x01, 3, 55, 2 }; data/lirc-0.10.1/plugins/commandir.c:1221: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 deinit_led[7] = { 7, PROC_SET, 0x0, 0x02, 3, 45, 2 }; data/lirc-0.10.1/plugins/commandir.c:1224: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 commands[MAX_COMMAND]; data/lirc-0.10.1/plugins/commandir.c:1399: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(copy_new_signal, new_tx_signal, sizeof(struct tx_signal)); data/lirc-0.10.1/plugins/commandir.c:1402: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(copy_new_signal->raw_signal, new_tx_signal->raw_signal, bytes); data/lirc-0.10.1/plugins/commandir.c:1406: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(copy_new_signal->bitmask_emitters_list, pcd->next_enabled_emitters_list, data/lirc-0.10.1/plugins/commandir.c:1602:21: [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 lightchange[7] = { 7, data/lirc-0.10.1/plugins/commandir.c:1809: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(ptx->bitmask_emitters_list, pcd->next_enabled_emitters_list, data/lirc-0.10.1/plugins/commandir.c:1854: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 packet[TX_BUFFER_SIZE]; data/lirc-0.10.1/plugins/commandir.c:1868: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 cmdir_char[66]; data/lirc-0.10.1/plugins/commandir.c:2151: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 incomingBuffer[MAX_INCOMING_BUFFER + 30]; data/lirc-0.10.1/plugins/commandir.c:2229:6: [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(&incomingBuffer[MAX_INCOMING_BUFFER], &incomingBuffer[0], mySize + 1); data/lirc-0.10.1/plugins/commandir.c:2416: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(ar_current_tx_mask_list, ar_new_tx_mask_list, new_tx_len * sizeof(int)); data/lirc-0.10.1/plugins/creative.c:38: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 b[NUMBYTES]; data/lirc-0.10.1/plugins/creative.c:93: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). drv.fd = open(drv.device, O_RDWR | O_NONBLOCK | O_NOCTTY); data/lirc-0.10.1/plugins/creative_infracd.c:95:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char dev_name[32]; data/lirc-0.10.1/plugins/creative_infracd.c:101: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 inqCmdBlk[SCSI_INQ_CMD_LEN] = { INQUIRY, 0, 0, 0, MAX_SCSI_REPLY_LEN, 0 }; data/lirc-0.10.1/plugins/creative_infracd.c:102: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 Buff[MAX_SCSI_REPLY_LEN]; data/lirc-0.10.1/plugins/creative_infracd.c:103: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 sense_buffer[32]; data/lirc-0.10.1/plugins/creative_infracd.c:149: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 senCmdBlk[SCSI_SEN_CMD_LEN] = { MODE_SENSE_10, 0, 0, 0, 0, 0, 0, 0, MAX_SCSI_REPLY_LEN, 0 }; data/lirc-0.10.1/plugins/creative_infracd.c:151: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 sense_buffer[255]; data/lirc-0.10.1/plugins/creative_infracd.c:152: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 Buff[MAX_SCSI_REPLY_LEN]; data/lirc-0.10.1/plugins/creative_infracd.c:214: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). fd = open(drv.device, O_RDWR); data/lirc-0.10.1/plugins/creative_infracd.c:225:3: [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(dev_name, "/dev/sg%c", c); data/lirc-0.10.1/plugins/creative_infracd.c:226: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). fd = open(dev_name, O_RDWR); data/lirc-0.10.1/plugins/creative_infracd.c:255: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). drv.fd = open("/dev/null", O_RDONLY); data/lirc-0.10.1/plugins/creative_infracd.c:266: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("/proc/scsi/scsi", O_RDONLY); data/lirc-0.10.1/plugins/creative_infracd.c:271: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). fd = open("/proc/scsi/ide-scsi/0", O_RDONLY); data/lirc-0.10.1/plugins/default.c:135: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[512]; data/lirc-0.10.1/plugins/default.c:136: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 buff[128]; data/lirc-0.10.1/plugins/default.c:152: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/lirc-0.10.1/plugins/default.c:176: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_WRONLY); data/lirc-0.10.1/plugins/default.c:250: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 pathbuf[128]; data/lirc-0.10.1/plugins/default.c:365: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). drv.fd = open(drv.device, O_RDWR); data/lirc-0.10.1/plugins/devinput.c:128: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/input/uinput", O_RDWR); data/lirc-0.10.1/plugins/devinput.c:130: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). fd = open("/dev/uinput", O_RDWR); data/lirc-0.10.1/plugins/devinput.c:132:9: [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/misc/uinput", O_RDWR); data/lirc-0.10.1/plugins/devinput.c:240: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 devname[256]; data/lirc-0.10.1/plugins/devinput.c:276: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 devname[FILENAME_MAX]; data/lirc-0.10.1/plugins/devinput.c:277: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 ioname[255]; data/lirc-0.10.1/plugins/devinput.c:308: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). fd = open(devname, O_RDONLY); data/lirc-0.10.1/plugins/devinput.c:350: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 errmsg[256]; data/lirc-0.10.1/plugins/devinput.c:371: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). drv.fd = open(drv.device, O_RDONLY); data/lirc-0.10.1/plugins/dfclibusb.c:44:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char device_path[10000] = {0}; data/lirc-0.10.1/plugins/dfclibusb.c:246: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 rcv_code[6]; data/lirc-0.10.1/plugins/dfclibusb.c:257: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[16]; // CODE_BYTES data/lirc-0.10.1/plugins/dsp.c:96: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). drv.fd = open(drv.device, O_RDONLY); data/lirc-0.10.1/plugins/dsp.c:125: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). drv.fd = open("/dev/zero", O_RDONLY); data/lirc-0.10.1/plugins/ea65.c:116: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). drv.fd = open(drv.device, O_RDWR | O_NONBLOCK | O_NOCTTY); data/lirc-0.10.1/plugins/file.c:112:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char line[64]; data/lirc-0.10.1/plugins/file.c:113: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 what[16]; data/lirc-0.10.1/plugins/file.c:154: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). outfile_fd = open(device, O_WRONLY | O_CREAT | O_APPEND, 0666); data/lirc-0.10.1/plugins/file.c:202: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[32]; data/lirc-0.10.1/plugins/file.c:244: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 buff[256]; data/lirc-0.10.1/plugins/file.c:261:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). infile = fopen(opt->value, "r"); data/lirc-0.10.1/plugins/ftdi.c:124: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 vendor[128]; data/lirc-0.10.1/plugins/ftdi.c:125: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 descr[128]; data/lirc-0.10.1/plugins/ftdi.c:127: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 device[256]; data/lirc-0.10.1/plugins/ftdi.c:238: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 buf[RXBUFSZ > TXBUFSZ ? RXBUFSZ : TXBUFSZ]; data/lirc-0.10.1/plugins/ftdi.c:326: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[1]; data/lirc-0.10.1/plugins/ftdi.c:617: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[TXBUFSZ]; data/lirc-0.10.1/plugins/ftdi.c:852: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[TXBUFSZ]; data/lirc-0.10.1/plugins/girs.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 version[LONG_LINE_SIZE]; // Use to indicate valid device data/lirc-0.10.1/plugins/girs.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 driver_version[LONG_LINE_SIZE]; data/lirc-0.10.1/plugins/girs.c:267: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 command[LONG_LINE_SIZE]; data/lirc-0.10.1/plugins/girs.c:270: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 answer[LONG_LINE_SIZE]; data/lirc-0.10.1/plugins/girs.c:464: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[strlen(command) + strlen(EOL) + 1]; data/lirc-0.10.1/plugins/girs.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 answer[LONG_LINE_SIZE]; data/lirc-0.10.1/plugins/girs.c:585: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[LONG_LINE_SIZE]; data/lirc-0.10.1/plugins/girs.c:719: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). drv.fd = open(drv.device, O_RDWR | O_NONBLOCK | O_NOCTTY); data/lirc-0.10.1/plugins/girs.c:760: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 ipname[strlen(drv.device)+1]; data/lirc-0.10.1/plugins/girs.c:761: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 portnumber[SMALLSTRINGSIZE]; // yes, not an int or short! data/lirc-0.10.1/plugins/girs.c:836: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[LONG_LINE_SIZE]; data/lirc-0.10.1/plugins/girs.c:908: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 buff[LONG_LINE_SIZE]; data/lirc-0.10.1/plugins/girs.c:966: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[LONG_LINE_SIZE]; data/lirc-0.10.1/plugins/girs.c:985: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 b[SMALLSTRINGSIZE]; data/lirc-0.10.1/plugins/hiddev.c:243: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). drv.fd = open(drv.device, O_RDONLY); data/lirc-0.10.1/plugins/hiddev.c:847: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[16]; data/lirc-0.10.1/plugins/i2cuser.c:107: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 device_name[256]; data/lirc-0.10.1/plugins/i2cuser.c:126: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 s[512]; data/lirc-0.10.1/plugins/i2cuser.c:139:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen(s, "r"); data/lirc-0.10.1/plugins/i2cuser.c:144:8: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen(s, "r"); data/lirc-0.10.1/plugins/i2cuser.c:163:12: [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). found = atoi(de->d_name + 4); data/lirc-0.10.1/plugins/i2cuser.c:177:9: [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). return open(device_name, O_RDWR); data/lirc-0.10.1/plugins/i2cuser.c:252: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 buf[3], code_buf[CODE_SIZE]; data/lirc-0.10.1/plugins/irlink.c:140:9: [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). port = open(portName, O_RDWR | O_NOCTTY | O_NDELAY); data/lirc-0.10.1/plugins/irtoy.c:102:17: [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 rawSB[WBUF_SIZE * 2 + 2]; data/lirc-0.10.1/plugins/irtoy.c:167: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 array[3]; data/lirc-0.10.1/plugins/irtoy.c:249: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 dur[2]; data/lirc-0.10.1/plugins/irtoy.c:309: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[16]; data/lirc-0.10.1/plugins/irtoy.c:344: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). vNum = atoi(buf + 1); data/lirc-0.10.1/plugins/irtoy.c:354:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[16]; data/lirc-0.10.1/plugins/irtoy.c:373: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[16]; data/lirc-0.10.1/plugins/irtoy.c:399: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). dev->protoVersion = atoi(buf + 1); data/lirc-0.10.1/plugins/irtoy.c:440: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). drv.fd = open(drv.device, O_RDWR | O_NONBLOCK | O_NOCTTY); data/lirc-0.10.1/plugins/irtoy.c:501:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char _devname[20]; data/lirc-0.10.1/plugins/irtoy.c:507: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 tmp[64]; data/lirc-0.10.1/plugins/irtoy.c:525: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(tmp, "/dev/ttyACM%d", i); data/lirc-0.10.1/plugins/irtoy.c:531: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(_devname, "/dev/ttyACM%d", i); data/lirc-0.10.1/plugins/irtoy.c:588: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 reply[16]; data/lirc-0.10.1/plugins/livedrive_common.c:47: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). drv.fd = open(drv.device, O_RDONLY, 0); data/lirc-0.10.1/plugins/livedrive_common.h:33: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 vendor_id[3]; data/lirc-0.10.1/plugins/livedrive_common.h:35: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 filler[2]; data/lirc-0.10.1/plugins/livedrive_common.h:37: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 remote[2]; data/lirc-0.10.1/plugins/livedrive_common.h:38: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 key[2]; data/lirc-0.10.1/plugins/logitech.c:38:17: [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 b[NUMBYTES]; data/lirc-0.10.1/plugins/logitech.c:92: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). drv.fd = open(drv.device, O_RDWR | O_NONBLOCK | O_NOCTTY); data/lirc-0.10.1/plugins/mouseremote.c:125: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). drv.fd = open(drv.device, O_RDWR | O_NONBLOCK | O_NOCTTY); data/lirc-0.10.1/plugins/mouseremote.c:159: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). drv.fd = open(drv.device, O_RDWR | O_NONBLOCK | O_NOCTTY); data/lirc-0.10.1/plugins/mouseremote.c:182: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 b[NUMBYTES]; data/lirc-0.10.1/plugins/mp3anywhere.c:39:17: [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 b[NUMBYTES]; data/lirc-0.10.1/plugins/mp3anywhere.c:94: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). drv.fd = open(drv.device, O_RDWR | O_NONBLOCK | O_NOCTTY); data/lirc-0.10.1/plugins/mplay.c:308: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 response[MPLAY2_INIT_RESPONSE_LENGTH + 1]; data/lirc-0.10.1/plugins/mplay.c:679: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 device[128]; data/lirc-0.10.1/plugins/mplay.c:714:5: [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). open(device, O_RDWR | O_NONBLOCK | O_NOCTTY); data/lirc-0.10.1/plugins/osx_usbraw.c:253: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[16]; data/lirc-0.10.1/plugins/pcmak.c:94: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). drv.fd = open(drv.device, O_RDWR | O_NONBLOCK | O_NOCTTY); data/lirc-0.10.1/plugins/pinsys.c:60:17: [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 b[3]; data/lirc-0.10.1/plugins/pinsys.c:124: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 device[20]; data/lirc-0.10.1/plugins/pinsys.c:130:3: [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(device, "/dev/ttyS%d", i); data/lirc-0.10.1/plugins/pinsys.c:134: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). port = open("/dev/ttyS0", O_RDONLY | O_NOCTTY); data/lirc-0.10.1/plugins/pinsys.c:186: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). drv.fd = open(drv.device, O_RDWR | O_NONBLOCK | O_NOCTTY); data/lirc-0.10.1/plugins/pinsys.c:209: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). drv.fd = open(drv.device, O_RDWR | O_NONBLOCK | O_NOCTTY); data/lirc-0.10.1/plugins/pinsys.c:261:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char pinsys_codes[8] = { 0xD1, 0x73, 0xE6, 0x1D, 0x3A, 0x74, 0xE8, 0x00 }; data/lirc-0.10.1/plugins/pixelview.c:34:17: [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 b[3]; data/lirc-0.10.1/plugins/pixelview.c:96: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). drv.fd = open(drv.device, O_RDWR | O_NONBLOCK | O_NOCTTY); data/lirc-0.10.1/plugins/silitek.c:40: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 b[NUMBYTES]; data/lirc-0.10.1/plugins/silitek.c:110: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). drv.fd = open(drv.device, O_RDWR | O_NOCTTY | O_NDELAY); data/lirc-0.10.1/plugins/srm7500libusb.c:282: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 erroroptionstring[op_end - op_start + 1]; data/lirc-0.10.1/plugins/srm7500libusb.c:713: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). if (atoi(usb_bus->dirname) == requested_usb_bus_number) data/lirc-0.10.1/plugins/srm7500libusb.c:874: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(packet_buffer_out.data, packet_buffer_in.data, 8); data/lirc-0.10.1/plugins/tira.c:80:17: [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 b[6]; data/lirc-0.10.1/plugins/tira.c:157: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 response[64 + 1]; data/lirc-0.10.1/plugins/tira.c:208: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 tirabuffer[64]; data/lirc-0.10.1/plugins/tira.c:568: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). drv.fd = open(drv.device, O_RDWR | O_NONBLOCK | O_NOCTTY); data/lirc-0.10.1/plugins/udp.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 buff[128]; data/lirc-0.10.1/plugins/udp.c:183: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). zerofd = open("/dev/zero", O_RDONLY); data/lirc-0.10.1/plugins/uirt2.c:53:17: [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 b[NUMBYTES]; data/lirc-0.10.1/plugins/uirt2.c:103: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). drv.fd = open(drv.device, O_RDWR | O_NONBLOCK | O_NOCTTY); data/lirc-0.10.1/plugins/uirt2_common.c:134: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, buf, len + 1); data/lirc-0.10.1/plugins/uirt2_common.c:206: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(in + 1, buf, len + 1); data/lirc-0.10.1/plugins/uirt2_common.c:409: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(masks, out + 2, 4); data/lirc-0.10.1/plugins/uirt2_common.c:427: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(code, out + 1, UIRT2_CODE_SIZE); data/lirc-0.10.1/plugins/uirt2_common.c:442: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(in + 4, code, UIRT2_CODE_SIZE); data/lirc-0.10.1/plugins/uirt2_common.c:463: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(ports, out + 1, 4); data/lirc-0.10.1/plugins/uirt2_common.c:586: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 + 2, buf, length); data/lirc-0.10.1/plugins/uirt2_common.c:606: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(&rem_ext.data, buf, sizeof(*buf)); data/lirc-0.10.1/plugins/uirt2_common.c:611: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(tmp + 2, &rem_ext, sizeof(rem_ext)); data/lirc-0.10.1/plugins/uirt2_common.c:618: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(&rem.data, buf, sizeof(*buf)); data/lirc-0.10.1/plugins/uirt2_raw.c:204: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). drv.fd = open(drv.device, O_RDWR | O_NONBLOCK | O_NOCTTY); data/lirc-0.10.1/plugins/usbx.c:58:17: [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 b[6]; data/lirc-0.10.1/plugins/usbx.c:135: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). drv.fd = open(drv.device, O_RDWR | O_NONBLOCK | O_NOCTTY); data/lirc-0.10.1/plugins/zotac.c:285:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd_hidraw = open(drv.device, O_RDONLY); data/lirc-0.10.1/python-pkg/lirc/_client.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 text[128]; data/lirc-0.10.1/tools/irexec.cpp:56:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char path[256] = {0}; data/lirc-0.10.1/tools/irpipe.cpp:139: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(device, mode); data/lirc-0.10.1/tools/irpipe.cpp:175:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char line[128]; data/lirc-0.10.1/tools/irpipe.cpp:176: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 buff[128]; data/lirc-0.10.1/tools/irpipe.cpp:206: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 buff[2048 * sizeof(int)]; data/lirc-0.10.1/tools/irpipe.cpp:231: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 buff[2048 * sizeof(int)]; data/lirc-0.10.1/tools/irpty.cpp: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 buf[BUFFSIZE]; data/lirc-0.10.1/tools/irpty.cpp:208: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(pty_name, "/dev/ptyp0"); data/lirc-0.10.1/tools/irpty.cpp:214:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fd = open(pty_name, O_RDWR)) >= 0) { data/lirc-0.10.1/tools/irpty.cpp:240: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). if ((fds = open(tty_name, O_RDWR)) < 0) { data/lirc-0.10.1/tools/irpty.cpp:251: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 pts_name[20]; data/lirc-0.10.1/tools/irpty.cpp:316: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 slave_name[20]; data/lirc-0.10.1/tools/irrecord-ui.cpp:266: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 default_level[4]; data/lirc-0.10.1/tools/irrecord-ui.cpp:410: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 filename_new[256]; data/lirc-0.10.1/tools/irrecord-ui.cpp:411: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 logpath[256]; data/lirc-0.10.1/tools/irrecord-ui.cpp:436:6: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen(opts->filename, "r"); data/lirc-0.10.1/tools/irrecord-ui.cpp:493: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(filename_new, "irrecord-tmp-XXXXXX"); data/lirc-0.10.1/tools/irrecord-ui.cpp:494: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(filename_new); data/lirc-0.10.1/tools/irrecord-ui.cpp:527:17: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). unlink(opts->tmpfile); data/lirc-0.10.1/tools/irrecord-ui.cpp:538:16: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). unlink(opts->tmpfile); data/lirc-0.10.1/tools/irrecord-ui.cpp:548:16: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). unlink(opts->tmpfile); data/lirc-0.10.1/tools/irrecord-ui.cpp:863: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 buff[4096]; data/lirc-0.10.1/tools/irrecord-ui.cpp:1016:17: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). unlink(opts->tmpfile); data/lirc-0.10.1/tools/irrecord-ui.cpp:1079: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 buff[256]; data/lirc-0.10.1/tools/irrecord-ui.cpp:1080: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 basename[256]; data/lirc-0.10.1/tools/irrecord-ui.cpp:1081: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[256]; data/lirc-0.10.1/tools/irrecord-ui.cpp:1183:19: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). r = rename(opts.tmpfile, opts.filename); data/lirc-0.10.1/tools/irrecord-ui.cpp:1191:18: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). if (access(opts.tmpfile, F_OK) == 0 && unlink(opts.tmpfile) != 0) { data/lirc-0.10.1/tools/irrecord-ui.cpp:1191:53: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). if (access(opts.tmpfile, F_OK) == 0 && unlink(opts.tmpfile) != 0) { data/lirc-0.10.1/tools/irrecord-ui.cpp:1193:46: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). "Cannot remove temporary file %s\n", opts.tmpfile); data/lirc-0.10.1/tools/irsend.cpp:70: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 keysym[32]; data/lirc-0.10.1/tools/irsend.cpp:71: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 remote[64]; data/lirc-0.10.1/tools/irsend.cpp:72: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 trash[32]; data/lirc-0.10.1/tools/irsend.cpp: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 buffer[PACKET_SIZE + 1]; data/lirc-0.10.1/tools/irsimreceive.cpp:21: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 plugindir[128]; data/lirc-0.10.1/tools/irsimreceive.cpp:106: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(option.key, "set-infile"); data/lirc-0.10.1/tools/irsimreceive.cpp:124:6: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen(filename, "r"); data/lirc-0.10.1/tools/irsimreceive.cpp:180: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[128]; data/lirc-0.10.1/tools/irsimsend.cpp:63: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 plugindir[128]; data/lirc-0.10.1/tools/irsimsend.cpp:157:6: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen(path, "r"); data/lirc-0.10.1/tools/irsimsend.cpp:175: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 buff[64]; data/lirc-0.10.1/tools/irsimsend.cpp:185: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 last_code[32] = { '\0' }; data/lirc-0.10.1/tools/irsimsend.cpp:239:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char line[256]; data/lirc-0.10.1/tools/irsimsend.cpp:240: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 keysym[32]; data/lirc-0.10.1/tools/irsimsend.cpp:246:6: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen(opt_listfile, "r"); data/lirc-0.10.1/tools/irsimsend.cpp: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 path[128]; data/lirc-0.10.1/tools/irtestcase.cpp:112:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). code_log = fopen(CODE_LOG, "w"); data/lirc-0.10.1/tools/irtestcase.cpp:118:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). app_log = fopen(APP_LOG, "w"); data/lirc-0.10.1/tools/irtestcase.cpp:173: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 code[64]; data/lirc-0.10.1/tools/irtestcase.cpp:208: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[128]; data/lirc-0.10.1/tools/irw.cpp:49: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[128]; data/lirc-0.10.1/tools/irxevent.cpp:528: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 buff[512]; data/lirc-0.10.1/tools/irxevent.cpp:582: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 keyname[128]; data/lirc-0.10.1/tools/irxevent.cpp:584:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char windowname[64]; data/lirc-0.10.1/tools/lirc-lsplugins.cpp:147: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 key1[255]; data/lirc-0.10.1/tools/lirc-lsplugins.cpp:148: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 key2[255]; data/lirc-0.10.1/tools/lirc-lsplugins.cpp:291: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 buff[256]; data/lirc-0.10.1/tools/lirc-lsplugins.cpp:319: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[1024]; data/lirc-0.10.1/tools/lirc-lsplugins.cpp:377: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]; data/lirc-0.10.1/tools/lirc-lsplugins.cpp:464: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 [128]; data/lirc-0.10.1/tools/lirc-lsremotes.cpp:59: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 pattern[256]; data/lirc-0.10.1/tools/lirc-lsremotes.cpp:77:3: [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(buff, "no_lircmd"); data/lirc-0.10.1/tools/lirc-lsremotes.cpp:86: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 try_buff[256]; data/lirc-0.10.1/tools/lirc-lsremotes.cpp:90: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(buff, "no_photo"); data/lirc-0.10.1/tools/lirc-lsremotes.cpp: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 my_path[256]; data/lirc-0.10.1/tools/lirc-lsremotes.cpp:118: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 photo[256]; data/lirc-0.10.1/tools/lirc-lsremotes.cpp:119:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char lircmd[256]; data/lirc-0.10.1/tools/lirc-lsremotes.cpp:131:6: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen(path, "r"); data/lirc-0.10.1/tools/lirc-lsremotes.cpp:167: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 buff[512]; data/lirc-0.10.1/tools/lirc-lsremotes.cpp:202: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 dirpath[512]; data/lirc-0.10.1/tools/lirc-lsremotes.cpp: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 filepath[512]; data/lirc-0.10.1/tools/lirc-lsremotes.cpp:250: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 buff[256]; data/lirc-0.10.1/tools/lirc-lsremotes.cpp:256:6: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen(path, "r"); data/lirc-0.10.1/tools/lirc-lsremotes.cpp:271: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[128]; data/lirc-0.10.1/tools/mode2.cpp:124: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 level[12]; data/lirc-0.10.1/tools/mode2.cpp:191:12: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). t_div = atoi(optarg); data/lirc-0.10.1/tools/mode2.cpp:200:14: [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). opt_gap = atoi(optarg); data/lirc-0.10.1/tools/mode2.cpp:243: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). fd = open(device, O_RDONLY); data/lirc-0.10.1/tools/mode2.cpp:404: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 buffspace[bytes]; data/lirc-0.10.1/tools/mode2.cpp:471: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 logpath[256]; data/lirc-0.10.1/tools/xmode2.cpp: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 level[12]; data/lirc-0.10.1/tools/xmode2.cpp:184: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 driver[64]; data/lirc-0.10.1/tools/xmode2.cpp:187: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(driver, "default"); data/lirc-0.10.1/tools/xmode2.cpp:303: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 textbuffer[80]; data/lirc-0.10.1/tools/xmode2.cpp:310:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(textbuffer, "%5.3f ms/div", div/100.0); data/lirc-0.10.1/tools/xmode2.cpp:325: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 textbuffer[80]; data/lirc-0.10.1/tools/xmode2.cpp:327: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 logpath[256]; data/lirc-0.10.1/tools/xmode2.cpp:354: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). fd = open(device, O_RDONLY); data/lirc-0.10.1/tools/xmode2.cpp:452:7: [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(textbuffer, "%5.3f ms/div", div_ / 100.0); data/lirc-0.10.1/daemons/lircd-uinput.cpp:276:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(optbuff, repeat_opt, sizeof(optbuff) - 1); data/lirc-0.10.1/daemons/lircd-uinput.cpp:508:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). r = read(opts->inputfd, buffer, PACKET_SIZE); data/lirc-0.10.1/daemons/lircd-uinput.cpp:562:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(dev.name, DEVNAME, sizeof(dev.name) - 1); data/lirc-0.10.1/daemons/lircd-uinput.cpp:599:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(addr.sun_path, path, sizeof(addr.sun_path) - 1); data/lirc-0.10.1/daemons/lircd.cpp:349:5: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(WRITE_SLEEP_US); data/lirc-0.10.1/daemons/lircd.cpp:365: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(buf); data/lirc-0.10.1/daemons/lircd.cpp:399:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = read(fd, buf, len); data/lirc-0.10.1/daemons/lircd.cpp:696:22: [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 (user == NULL || strlen(user) == 0) { data/lirc-0.10.1/daemons/lircd.cpp:791:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char server[strlen(server_arg) + 1]; data/lirc-0.10.1/daemons/lircd.cpp:793:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(server, server_arg, sizeof(server)); data/lirc-0.10.1/daemons/lircd.cpp:917:12: [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(buffer); data/lirc-0.10.1/daemons/lircd.cpp:1083:2: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(0); data/lirc-0.10.1/daemons/lircd.cpp:1131: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(buffer2); data/lirc-0.10.1/daemons/lircd.cpp:1428: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(message); data/lirc-0.10.1/daemons/lircd.cpp:1472:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(s) == 0 || space != NULL) data/lirc-0.10.1/daemons/lircd.cpp:1475:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). sim = (char*) malloc(strlen(arguments) + 1 + 1); data/lirc-0.10.1/daemons/lircd.cpp:1479:2: [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(sim, "\n"); data/lirc-0.10.1/daemons/lircd.cpp:1625:6: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. r = sscanf(arguments, "%32s %64s", option.key, option.value); data/lirc-0.10.1/daemons/lircd.cpp:1648:7: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. r = sscanf(arguments, "%128s", buff); data/lirc-0.10.1/daemons/lircd.cpp:1693:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). packet_length = strlen(buffer) + 1; data/lirc-0.10.1/daemons/lircd.cpp:1696:3: [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(backup, "\n"); data/lirc-0.10.1/daemons/lircd.cpp:2085:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char optarg[strlen(optarg_arg) + 1]; data/lirc-0.10.1/daemons/lircd.cpp:2153:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buff, opt, sizeof(buff) - 1); data/lirc-0.10.1/daemons/lircd.cpp:2167: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(progname, "lircd", sizeof(progname)); data/lirc-0.10.1/daemons/lircmd.cpp:258:2: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(0); data/lirc-0.10.1/daemons/lircmd.cpp:281:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(dev.name, name, sizeof(dev.name)); data/lirc-0.10.1/daemons/lircmd.cpp:486:4: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(1); data/lirc-0.10.1/daemons/lircmd.cpp:569:8: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(CLICK_DELAY); data/lirc-0.10.1/daemons/lircmd.cpp:608:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(buffer); data/lirc-0.10.1/daemons/lircmd.cpp:844:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). len = read(lircd, buffer + end_len, PACKET_SIZE - end_len); data/lirc-0.10.1/daemons/lircmd.cpp:860: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). end_len = strlen(end); data/lirc-0.10.1/daemons/lircmd.cpp:889:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(addr.sun_path, data/lirc-0.10.1/daemons/lircrcd.cpp:176: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(buf); data/lirc-0.10.1/daemons/lircrcd.cpp:209:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = read(fd, buf, len); data/lirc-0.10.1/daemons/lircrcd.cpp:291:57: [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). sizeof(addr->sun_path)) || (socketname != NULL && strlen(socketname) >= sizeof(addr->sun_path))) { data/lirc-0.10.1/daemons/lircrcd.cpp:447:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char buffer[strlen(result) + 1 + 1]; data/lirc-0.10.1/daemons/lircrcd.cpp:497: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(buffer); data/lirc-0.10.1/daemons/lircrcd.cpp:534:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). packet_length = strlen(buffer) + 1; data/lirc-0.10.1/daemons/lircrcd.cpp:537:3: [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(backup, "\n"); data/lirc-0.10.1/daemons/lircrcd.cpp:727:2: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(0); data/lirc-0.10.1/lib/ciniparser.c:129: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). len = (int)strlen(line); data/lirc-0.10.1/lib/ciniparser.c:270: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). seclen = (int)strlen(secname); data/lirc-0.10.1/lib/ciniparser.c:400:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = (int)strlen(line) - 1; data/lirc-0.10.1/lib/config_file.c:261:52: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((code == (uint64_t) -1 && errno == ERANGE) || strlen(endptr) != 0 || strlen(val) == 0) { data/lirc-0.10.1/lib/config_file.c:261:75: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((code == (uint64_t) -1 && errno == ERANGE) || strlen(endptr) != 0 || strlen(val) == 0) { data/lirc-0.10.1/lib/config_file.c:762: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(s); data/lirc-0.10.1/lib/config_file.c:800: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(current) >= dst_size) data/lirc-0.10.1/lib/config_file.c:804: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). dirlen = strlen(dir); data/lirc-0.10.1/lib/config_file.c:808:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (dirlen + 1 + strlen(child) + 1 > dst_size) data/lirc-0.10.1/lib/config_file.c:810:2: [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(dst, "/"); data/lirc-0.10.1/lib/config_file.c:911: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). val[strlen(val) - 1] = '\0'; data/lirc-0.10.1/lib/config_file.c:961:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(buf); data/lirc-0.10.1/lib/dictionary.c:80: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(key); data/lirc-0.10.1/lib/driver.c:45:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buff, path, sizeof(buff) - 1); data/lirc-0.10.1/lib/driver.c:72: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). if (options == NULL || strlen(options) == 0) data/lirc-0.10.1/lib/driver.c:74: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). s = alloca(strlen(options) + 1); data/lirc-0.10.1/lib/drv_admin.c:174:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buff, dirpath, sizeof(buff) - 1); data/lirc-0.10.1/lib/drv_admin.c:175:12: [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 (buff[strlen(buff) - 1] == '/') data/lirc-0.10.1/lib/drv_admin.c:176: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). buff[strlen(buff) - 1] = '\0'; data/lirc-0.10.1/lib/drv_admin.c:213:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). tmp_path = alloca(strlen(pluginpath) + 1); data/lirc-0.10.1/lib/drv_admin.c:214:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(tmp_path, pluginpath, strlen(pluginpath) + 1); data/lirc-0.10.1/lib/drv_admin.c:214: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). strncpy(tmp_path, pluginpath, strlen(pluginpath) + 1); data/lirc-0.10.1/lib/drv_admin.c:257:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(names.array[i]) > maxlen) data/lirc-0.10.1/lib/drv_admin.c:258: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). maxlen = strlen(names.array[i]); data/lirc-0.10.1/lib/dump_config.c:64:3: [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(cmd, ""); data/lirc-0.10.1/lib/ir_remote.c:758:6: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(message, data/lirc-0.10.1/lib/ir_remote.c:841:6: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(usecs); data/lirc-0.10.1/lib/irrecord.c:155:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while (read(curr_driver->fd, buffer, size) == size) data/lirc-0.10.1/lib/irrecord.c:1819:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return read(curr_driver->fd, buffer, size); data/lirc-0.10.1/lib/irrecord.c:1898:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(btn_state->buffer) == 0) data/lirc-0.10.1/lib/lirc-utils.c:88: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). else if (strlen(new_user) == 0) data/lirc-0.10.1/lib/lirc/lirc_log.h:237:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, buf, count) == -1) data/lirc-0.10.1/lib/lirc_client.c:143:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = read(fd, cmd->buffer + cmd->head, PACKET_SIZE - cmd->head); data/lirc-0.10.1/lib/lirc_client.c:200: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). todo = strlen(ctx->packet); data/lirc-0.10.1/lib/lirc_client.c:223: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). if (!string || strlen(string) == 0) data/lirc-0.10.1/lib/lirc_client.c:236:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(string)) != 0 data/lirc-0.10.1/lib/lirc_client.c:290:6: [1] (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 character. strcpy(ctx->reply, ""); data/lirc-0.10.1/lib/lirc_client.c:293:38: [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). chk_write(STDOUT_FILENO, string, strlen(string), data/lirc-0.10.1/lib/lirc_client.c:297:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ctx->reply, data/lirc-0.10.1/lib/lirc_client.c:299:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). PACKET_SIZE - strlen(ctx->reply)); data/lirc-0.10.1/lib/lirc_client.c:409:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(newline); data/lirc-0.10.1/lib/lirc_client.c:433: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(s); data/lirc-0.10.1/lib/lirc_client.c:572: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(s); data/lirc-0.10.1/lib/lirc_client.c:780:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(filename, home, MAXPATHLEN); data/lirc-0.10.1/lib/lirc_client.c:781:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (filename[strlen(filename) - 1] == '/') data/lirc-0.10.1/lib/lirc_client.c:782:12: [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). filename[strlen(filename) - 1] = '\0'; data/lirc-0.10.1/lib/lirc_client.c:798:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(path, getenv("XDG_CONFIG_HOME"), MAXPATHLEN); data/lirc-0.10.1/lib/lirc_client.c:799:3: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant character. strncat(path, "/", MAXPATHLEN - strlen(path)); data/lirc-0.10.1/lib/lirc_client.c:799:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncat(path, "/", MAXPATHLEN - strlen(path)); data/lirc-0.10.1/lib/lirc_client.c:800:3: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(path, CFG_LIRCRC, MAXPATHLEN - strlen(path)); data/lirc-0.10.1/lib/lirc_client.c:800: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). strncat(path, CFG_LIRCRC, MAXPATHLEN - strlen(path)); data/lirc-0.10.1/lib/lirc_client.c:805:3: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(path, "/.config/lircrc", MAXPATHLEN - strlen(path) - 1); data/lirc-0.10.1/lib/lirc_client.c:805:49: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncat(path, "/.config/lircrc", MAXPATHLEN - strlen(path) - 1); data/lirc-0.10.1/lib/lirc_client.c:821:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). } else if (strlen(filename) == 0) { data/lirc-0.10.1/lib/lirc_client.c:828: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). filename = realloc(filename, strlen(filename) + 1); data/lirc-0.10.1/lib/lirc_client.c:834: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). filename = realloc(filename, strlen(filename) + 1); data/lirc-0.10.1/lib/lirc_client.c:844: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). int pathlen = strlen(current_file); data/lirc-0.10.1/lib/lirc_client.c:848:38: [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). filename = (char*)malloc(pathlen + strlen(file) + 1); data/lirc-0.10.1/lib/lirc_client.c:1062:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(my_path, path, sizeof(my_path) - 1); data/lirc-0.10.1/lib/lirc_client.c:1063:3: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(buff, basename(my_path), size - 1); data/lirc-0.10.1/lib/lirc_client.c:1143: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). if (strlen(token2) == 0) { data/lirc-0.10.1/lib/lirc_client.c:1147:6: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(lircrc_class, data/lirc-0.10.1/lib/lirc_client.c:1292: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). || end[0] != 0 || strlen(token2) == data/lirc-0.10.1/lib/lirc_client.c:1306: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). || end[0] != 0 || strlen(token2) == data/lirc-0.10.1/lib/lirc_client.c:1320: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). || end[0] != 0 || strlen(token2) == data/lirc-0.10.1/lib/lirc_client.c:1832:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(static_buff, cmd.reply, PACKET_SIZE); data/lirc-0.10.1/lib/lirc_client.c:1905:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). len = read(lirc_lircd, lirc_buffer + end_len, data/lirc-0.10.1/lib/lirc_client.c:1923:12: [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). end_len = strlen(end); data/lirc-0.10.1/lib/lirc_client.c:1939: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). return strlen(buf); data/lirc-0.10.1/lib/lirc_client.c:1956:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(static_buff, cmd.reply, PACKET_SIZE); data/lirc-0.10.1/lib/lirc_client.c:1982:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(static_buff, cmd.reply, PACKET_SIZE); data/lirc-0.10.1/lib/lirc_client.c:2061: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(socket_path) + 1 > sizeof(addr_un.sun_path)) { data/lirc-0.10.1/lib/lirc_log.c:97:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(progname, _progname, sizeof(progname)); data/lirc-0.10.1/lib/lirc_log.c:277:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char buff[PRIO_LEN + strlen(format_str)]; data/lirc-0.10.1/lib/lirc_log.c:340:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buffer, getenv("XDG_CACHE_HOME"), size); data/lirc-0.10.1/lib/lirc_log.c:362:2: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant character. strncat(buffer, "/", size - strlen(buffer) - 1); data/lirc-0.10.1/lib/lirc_log.c:362: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). strncat(buffer, "/", size - strlen(buffer) - 1); data/lirc-0.10.1/lib/lirc_log.c:363:2: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(buffer, basename, size - strlen(buffer) - 1); data/lirc-0.10.1/lib/lirc_log.c:363:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncat(buffer, basename, size - strlen(buffer) - 1); data/lirc-0.10.1/lib/lirc_log.c:364:2: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(buffer, ".log", size - strlen(buffer) - 1); data/lirc-0.10.1/lib/lirc_log.c:364:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncat(buffer, ".log", size - strlen(buffer) - 1); data/lirc-0.10.1/lib/lirc_log.c:377:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(str, prefix, sizeof(str)); data/lirc-0.10.1/lib/lirc_log.c:393:3: [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(str + pos, "NO DATA", sizeof(str)); data/lirc-0.10.1/lib/lirc_log.h:237:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, buf, count) == -1) data/lirc-0.10.1/lib/lirc_options.c:83:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). const int opt_len = strlen("--options_file"); data/lirc-0.10.1/lib/lirc_options.c:92: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). strlen(argv[i]) > 2 data/lirc-0.10.1/lib/receive.c:250:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(curr_driver->fd, buffer, count) != count) { data/lirc-0.10.1/lib/serial.c:321: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(filename) + strlen(s) > FILENAME_MAX) { data/lirc-0.10.1/lib/serial.c:321: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). if (strlen(filename) + strlen(s) > FILENAME_MAX) { data/lirc-0.10.1/lib/serial.c:341:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(lock, id, 10 + 1) == 10 + 1 && read(lock, id, 1) == 0 data/lirc-0.10.1/lib/serial.c:341:44: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(lock, id, 10 + 1) == 10 + 1 && read(lock, id, 1) == 0 data/lirc-0.10.1/lib/serial.c:408:12: [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). dirname[strlen(name) - strlen(last)] = 0; data/lirc-0.10.1/lib/serial.c:408: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). dirname[strlen(name) - strlen(last)] = 0; data/lirc-0.10.1/lib/serial.c:464: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). if (strlen(filename) + strlen(ep->d_name) > FILENAME_MAX) { data/lirc-0.10.1/lib/serial.c:464: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). if (strlen(filename) + strlen(ep->d_name) > FILENAME_MAX) { data/lirc-0.10.1/lib/serial.c:480:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). len = read(lock, id, sizeof(id) - 1); data/lirc-0.10.1/lib/serial.c:548:2: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(100 * 1000); data/lirc-0.10.1/lib/serial.c:570:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, byte, 1) != 1) { data/lirc-0.10.1/plugins/accent.c:244:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(drv.fd, &b[i], 1) == -1) { data/lirc-0.10.1/plugins/alsa_usb.c:122:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(my_device, glob.gl_pathv[0], sizeof(my_device) - 1); data/lirc-0.10.1/plugins/atwf83.c:208:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rd = read(fd_hidraw, ev, sizeof(ev)); data/lirc-0.10.1/plugins/atwf83.c:267:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rd = read(drv.fd, &ev, sizeof(ev)); data/lirc-0.10.1/plugins/audio.c:185:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(sendPipe[0], &signal, sizeof(signal)) > 0) { data/lirc-0.10.1/plugins/audio.c:268:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(drv.fd, &data, sizeof(data)); data/lirc-0.10.1/plugins/audio.c:302:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while (read(completedPipe[0], &completed, sizeof(completed)) == 1) data/lirc-0.10.1/plugins/audio.c:333: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(drv.device)) { data/lirc-0.10.1/plugins/audio.c:392: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). if (strlen(api) && strlen(device)) data/lirc-0.10.1/plugins/audio.c:392:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(api) && strlen(device)) data/lirc-0.10.1/plugins/audio.c:412:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(api) && strlen(device)) data/lirc-0.10.1/plugins/audio.c:412:22: [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(api) && strlen(device)) data/lirc-0.10.1/plugins/audio.c:564:2: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(50000); data/lirc-0.10.1/plugins/audio.c:589:2: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(outputLatency % 1000000); data/lirc-0.10.1/plugins/audio.c:599:2: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(20000); data/lirc-0.10.1/plugins/audio.c:652:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buff, device_info->name, sizeof(buff) - 1); data/lirc-0.10.1/plugins/audio_alsa.c:205:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(tmp_name, drv.device, sizeof(tmp_name) - 1); data/lirc-0.10.1/plugins/audio_alsa.c:511:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(drv.fd, &data, sizeof(data)); data/lirc-0.10.1/plugins/bte.c:124: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). if (write(drv.fd, prev_cmd, strlen(prev_cmd)) <= 0) { data/lirc-0.10.1/plugins/bte.c:228:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ok = read(drv.fd, &c, 1); data/lirc-0.10.1/plugins/bte.c:359:2: [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(msg, "\n"); // pad with newline data/lirc-0.10.1/plugins/commandir.c:646:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(drv.fd, &code, sizeof(lirc_t)) <= 0) { data/lirc-0.10.1/plugins/commandir.c:652:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(drv.fd, &code, sizeof(lirc_t)) <= 0) { data/lirc-0.10.1/plugins/commandir.c:832:4: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(USB_TIMEOUT_US); // wait a moment data/lirc-0.10.1/plugins/commandir.c:1245:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bytes_read = read(tochild_read, commands, MAX_COMMAND); data/lirc-0.10.1/plugins/commandir.c:1335:5: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(read_delay); data/lirc-0.10.1/plugins/creative.c:139:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(drv.fd, &b[i], 1) != 1) { data/lirc-0.10.1/plugins/creative_infracd.c:110:2: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(10); data/lirc-0.10.1/plugins/creative_infracd.c:129:2: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(10); data/lirc-0.10.1/plugins/creative_infracd.c:190:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(40); data/lirc-0.10.1/plugins/default.c:158:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). r = read(fd, buff, sizeof(buff)); data/lirc-0.10.1/plugins/default.c:242:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(pathbuf, globbuf.gl_pathv[0], size - 1); data/lirc-0.10.1/plugins/default.c:253:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(pathbuf, path, sizeof(pathbuf) - 1); data/lirc-0.10.1/plugins/default.c:279:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(drv.fd, &data, sizeof(data)); data/lirc-0.10.1/plugins/default.c:292:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(drv.fd, &data, sizeof(data)); data/lirc-0.10.1/plugins/default.c:342:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(addr.sun_path, drv.device, sizeof(addr.sun_path) - 1); data/lirc-0.10.1/plugins/devinput.c:143:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(dev.name) > 0) { data/lirc-0.10.1/plugins/devinput.c:144:4: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant character. strncat(dev.name, " ", sizeof(dev.name) - strlen(dev.name)); data/lirc-0.10.1/plugins/devinput.c:144:46: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncat(dev.name, " ", sizeof(dev.name) - strlen(dev.name)); data/lirc-0.10.1/plugins/devinput.c:148:2: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(dev.name, name, sizeof(dev.name) - strlen(dev.name) - 1); data/lirc-0.10.1/plugins/devinput.c:148:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncat(dev.name, name, sizeof(dev.name) - strlen(dev.name) - 1); data/lirc-0.10.1/plugins/devinput.c:251:3: [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(errmsg, "No /sys/class/rc/ devices found", size - 1); data/lirc-0.10.1/plugins/devinput.c:262:3: [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(errmsg, data/lirc-0.10.1/plugins/devinput.c:454:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rd = read(drv.fd, &event, sizeof(event)); data/lirc-0.10.1/plugins/dsp.c:61:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(myfd, buf, BUFSIZE * 2) != BUFSIZE * 2) data/lirc-0.10.1/plugins/ea65.c:159:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). r = read(drv.fd, data, sizeof(data)); data/lirc-0.10.1/plugins/file.c:122:4: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(timeout); data/lirc-0.10.1/plugins/file.c:128:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). chk_write(outfile_fd, line, strlen(line)); data/lirc-0.10.1/plugins/file.c:135:10: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. count = sscanf(line, "%15s %d", what, &data); data/lirc-0.10.1/plugins/file.c:205: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). chk_write(outfile_fd, buffer, strlen(buffer)); data/lirc-0.10.1/plugins/file.c:256: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). chk_write(outfile_fd, buff, strlen(buff)); data/lirc-0.10.1/plugins/file.c:267: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). chk_write(outfile_fd, buff, strlen(buff)); data/lirc-0.10.1/plugins/ftdi.c:241:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd_main2tx, buf, sizeof(buf)); data/lirc-0.10.1/plugins/ftdi.c:293:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(500000); data/lirc-0.10.1/plugins/ftdi.c:520:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = read(drv.fd, &res, sizeof(res)); data/lirc-0.10.1/plugins/girs.c:346:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rc = read(dev.fd, buf, count); data/lirc-0.10.1/plugins/girs.c:362:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rc = read(dev.fd, ((char*)buf) + numread, count - numread); data/lirc-0.10.1/plugins/girs.c:449: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). ssize_t nbytes = write(dev.fd, command, strlen(command)); // FIXME data/lirc-0.10.1/plugins/girs.c:451: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). if (nbytes != (ssize_t) strlen(command)) { data/lirc-0.10.1/plugins/girs.c:464: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). char buf[strlen(command) + strlen(EOL) + 1]; data/lirc-0.10.1/plugins/girs.c:464:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char buf[strlen(command) + strlen(EOL) + 1]; data/lirc-0.10.1/plugins/girs.c:466:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buf, command, strlen(command)+1); data/lirc-0.10.1/plugins/girs.c:466: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). strncpy(buf, command, strlen(command)+1); data/lirc-0.10.1/plugins/girs.c:467:2: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(buf, EOL, strlen(EOL)); data/lirc-0.10.1/plugins/girs.c:467:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncat(buf, EOL, strlen(EOL)); data/lirc-0.10.1/plugins/girs.c:505:4: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(SUCCESS_RESPONSE)) == 0; data/lirc-0.10.1/plugins/girs.c:555:2: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(DTR_WAIT * 1000); data/lirc-0.10.1/plugins/girs.c:597:5: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(TIMEOUT_RESPONSE)) != 0) data/lirc-0.10.1/plugins/girs.c:760:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char ipname[strlen(drv.device)+1]; data/lirc-0.10.1/plugins/girs.c:764:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ipname, drv.device, colon - drv.device); data/lirc-0.10.1/plugins/girs.c:766:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(portnumber, colon + 1, strlen(colon)); data/lirc-0.10.1/plugins/girs.c:766:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncpy(portnumber, colon + 1, strlen(colon)); data/lirc-0.10.1/plugins/girs.c:768:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ipname, drv.device, strlen(drv.device) + 1); data/lirc-0.10.1/plugins/girs.c:768:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncpy(ipname, drv.device, strlen(drv.device) + 1); data/lirc-0.10.1/plugins/girs.c:769:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(portnumber, DEFAULT_TCP_PORT, SMALLSTRINGSIZE-1); data/lirc-0.10.1/plugins/girs.c:855:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(dev.driver_version, hw_girs.driver_version, LONG_LINE_SIZE-1); data/lirc-0.10.1/plugins/girs.c:856:4: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant character. strncat(dev.driver_version, "/", 1); data/lirc-0.10.1/plugins/girs.c:857:4: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(dev.driver_version, dev.version, strlen(dev.version)); data/lirc-0.10.1/plugins/girs.c:857:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncat(dev.driver_version, dev.version, strlen(dev.version)); data/lirc-0.10.1/plugins/girs.c:914:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buff, path, sizeof(buff) - 1); data/lirc-0.10.1/plugins/girs.c:993:2: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(buf, " 1", 2); data/lirc-0.10.1/plugins/hiddev.c:320:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rd = read(drv.fd, &event, sizeof(event)); data/lirc-0.10.1/plugins/hiddev.c:355:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rd = read(drv.fd, &event, sizeof(event)); data/lirc-0.10.1/plugins/hiddev.c:418:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rd = read(drv.fd, &asus_events[i], sizeof(event)); data/lirc-0.10.1/plugins/hiddev.c:530:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rd = read(drv.fd, &uref, sizeof(uref)); data/lirc-0.10.1/plugins/hiddev.c:599:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rd = read(drv.fd, &ev[i], sizeof(ev[i])); data/lirc-0.10.1/plugins/hiddev.c:674:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rd = read(drv.fd, &uref, sizeof(uref)); data/lirc-0.10.1/plugins/hiddev.c:856:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rd = read(drv.fd, msg, 16); data/lirc-0.10.1/plugins/i2cuser.c:263:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rc = read(i2c_fd, &buf, sizeof(buf)); data/lirc-0.10.1/plugins/irlink.c:158:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return read(port, buffer, bufferSize); data/lirc-0.10.1/plugins/irlink.c:176:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(port, &data, sizeof(data)) <= 0) data/lirc-0.10.1/plugins/irtoy.c:206:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rc = read(fd, (char*)buf, count); data/lirc-0.10.1/plugins/irtoy.c:222:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rc = read(fd, ((char*)buf) + numread, count - numread); data/lirc-0.10.1/plugins/logitech.c:141:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(drv.fd, &b[i], 1) != 1) { data/lirc-0.10.1/plugins/mouseremote.c:198:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). val = read(drv.fd, &b[i], 1); data/lirc-0.10.1/plugins/mp3anywhere.c:146:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(drv.fd, &b[i], 1) != 1) { data/lirc-0.10.1/plugins/mplay.c:318:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(mplayfamily_local_data.fd, &response[i], 1) < 0) data/lirc-0.10.1/plugins/mplay.c:480:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). len = read(mplayfamily_local_data.fd, &code, sizeof(code)); data/lirc-0.10.1/plugins/mplay.c:621:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, &expired, sizeof(uint64_t)) != sizeof(uint64_t)) { data/lirc-0.10.1/plugins/mplay.c:688:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device, drv.device, sizeof(device)); data/lirc-0.10.1/plugins/mplay.c:911:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). len = read(drv.fd, &rc_code, 1); data/lirc-0.10.1/plugins/osx_usbraw.c:259:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rd = read(drv.fd, &rd_len, 1); data/lirc-0.10.1/plugins/osx_usbraw.c:268:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rd = read(drv.fd, msg, rd_len); data/lirc-0.10.1/plugins/pcmak.c:138:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(drv.fd, &b, 1) != 1) { data/lirc-0.10.1/plugins/pinsys.c:292:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(drv.fd, &b[i], 1) != 1) { data/lirc-0.10.1/plugins/pixelview.c:137:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(drv.fd, &b[i], 1) != 1) { data/lirc-0.10.1/plugins/silitek.c:82:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!read(fd, data, 1)) data/lirc-0.10.1/plugins/srm7500libusb.c:271:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy((char*)macBeaconPayload, op_start + 17, op_end - (op_start + 17)); data/lirc-0.10.1/plugins/srm7500libusb.c:284:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(erroroptionstring, op_start, op_end - op_start + 1); data/lirc-0.10.1/plugins/srm7500libusb.c:661:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rd = read(drv.fd, &rccode, 3); data/lirc-0.10.1/plugins/tira.c:184:2: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(2 * (100 * 1000)); data/lirc-0.10.1/plugins/tira.c:186:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). i = read(drv.fd, response, 2); data/lirc-0.10.1/plugins/tira.c:231:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). readsize = read(drv.fd, &tirabuffer[tirabuflen], sizeof(tirabuffer) - tirabuflen); data/lirc-0.10.1/plugins/tira.c:323:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(2 * (100 * 1000)); data/lirc-0.10.1/plugins/tira.c:325:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). i = read(drv.fd, response, 3); data/lirc-0.10.1/plugins/tira.c:379:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while (read(drv.fd, &ptr, 1) >= 0) data/lirc-0.10.1/plugins/tira.c:394:2: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(2 * (100 * 1000)); data/lirc-0.10.1/plugins/tira.c:407:4: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(2 * (100 * 1000)); data/lirc-0.10.1/plugins/tira.c:443:2: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(200000); data/lirc-0.10.1/plugins/tira.c:452:2: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(100000); data/lirc-0.10.1/plugins/tira.c:453:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). i = read(drv.fd, response, 2); data/lirc-0.10.1/plugins/tira.c:469:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while (read(drv.fd, &ptr, 1) >= 0) data/lirc-0.10.1/plugins/tira.c:479:2: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(200000); data/lirc-0.10.1/plugins/tira.c:490:2: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(50000); data/lirc-0.10.1/plugins/tira.c:491:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). i = read(drv.fd, response, 5); data/lirc-0.10.1/plugins/tira.c:506:4: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(200000); data/lirc-0.10.1/plugins/tira.c:512:4: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(200000); data/lirc-0.10.1/plugins/tira.c:514:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). i = read(drv.fd, response, sizeof(response) - 1); data/lirc-0.10.1/plugins/tira.c:541:2: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(50000); data/lirc-0.10.1/plugins/tira.c:552:2: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(50000); data/lirc-0.10.1/plugins/tira.c:656:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(drv.fd, &b[i], 1) != 1) { data/lirc-0.10.1/plugins/tira.c:792:4: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(200000); data/lirc-0.10.1/plugins/tira.c:803:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(200000); data/lirc-0.10.1/plugins/tira.c:804:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). i = read(drv.fd, wrtbuf, 3); data/lirc-0.10.1/plugins/tira.c:825:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(drv.fd, &data, sizeof(data)); data/lirc-0.10.1/plugins/uirt2.c:154:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(drv.fd, &b[i], 1) != 1) { data/lirc-0.10.1/plugins/uirt2_common.c:70:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rc = read(fd, buf, count); data/lirc-0.10.1/plugins/uirt2_common.c:85:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rc = read(fd, ((char*)buf) + pos, count - pos); data/lirc-0.10.1/plugins/uirt2_common.c:153:4: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(delay.tv_usec); data/lirc-0.10.1/plugins/uirt2_raw.c:219:2: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(100 * 1000); data/lirc-0.10.1/plugins/uirt2_raw.c:360:2: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(delay); data/lirc-0.10.1/plugins/usbx.c:173:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(drv.fd, &b[i], 1) != 1) { data/lirc-0.10.1/plugins/zotac.c:131:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rd = read(fd_hidraw, &uref, sizeof(uref)); data/lirc-0.10.1/plugins/zotac.c:418:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rd = read(drv.fd, &ev, sizeof(ev)); data/lirc-0.10.1/tools/irpipe.cpp:188:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buff, line, sizeof(buff) - 1); data/lirc-0.10.1/tools/irpipe.cpp:213:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((r = read(0, buff, sizeof(buff))) > 0) { data/lirc-0.10.1/tools/irpipe.cpp:235:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((r = read(0, buff, sizeof(buff))) > 0) { data/lirc-0.10.1/tools/irpty.cpp:95:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((nread = read(STDIN_FILENO, buf, BUFFSIZE)) < 0) data/lirc-0.10.1/tools/irpty.cpp:111: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). if (write(ptym, irchars, strlen(irchars)) != (int) strlen(irchars)) data/lirc-0.10.1/tools/irpty.cpp:111:58: [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 (write(ptym, irchars, strlen(irchars)) != (int) strlen(irchars)) data/lirc-0.10.1/tools/irpty.cpp:134:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((nread = read(ptym, buf, BUFFSIZE)) <= 0) data/lirc-0.10.1/tools/irrecord-ui.cpp:598:2: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). getchar(); data/lirc-0.10.1/tools/irrecord-ui.cpp:844:4: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). getchar(); data/lirc-0.10.1/tools/irrecord-ui.cpp:889:3: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). getchar(); data/lirc-0.10.1/tools/irrecord-ui.cpp:930:3: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). getchar(); data/lirc-0.10.1/tools/irrecord-ui.cpp:960:5: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). getchar(); data/lirc-0.10.1/tools/irrecord-ui.cpp:1098:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(buff) == 0) data/lirc-0.10.1/tools/irrecord-ui.cpp:1106:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(basename, opts->filename, sizeof(basename) - 1); data/lirc-0.10.1/tools/irrecord-ui.cpp:1160:2: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). getchar(); data/lirc-0.10.1/tools/irrecord-ui.cpp:1165:3: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). getchar(); data/lirc-0.10.1/tools/irsend.cpp:75:6: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. r = sscanf(code, "%x %x %32s %64s %32s", data/lirc-0.10.1/tools/irsend.cpp:190:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(directive) + strlen(code) + 2 < PACKET_SIZE) { data/lirc-0.10.1/tools/irsend.cpp:190: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). if (strlen(directive) + strlen(code) + 2 < PACKET_SIZE) { data/lirc-0.10.1/tools/irsend.cpp:198: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). if (strlen(buffer) + strlen(code) + 2 < PACKET_SIZE) { data/lirc-0.10.1/tools/irsend.cpp:198: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). if (strlen(buffer) + strlen(code) + 2 < PACKET_SIZE) { data/lirc-0.10.1/tools/irsend.cpp:199:22: [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). sprintf(buffer + strlen(buffer), " %s", code); data/lirc-0.10.1/tools/irsend.cpp:205:3: [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, "\n"); data/lirc-0.10.1/tools/irsimreceive.cpp:28:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(plugindir, s != NULL ? s : PLUGINDIR, sizeof(plugindir) - 1); data/lirc-0.10.1/tools/irsimreceive.cpp:107:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(option.value, path, sizeof(option.value)); data/lirc-0.10.1/tools/irsimreceive.cpp:152:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(s); data/lirc-0.10.1/tools/irsimreceive.cpp:153:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(s) > 2 && s[len - 1] == '\n') data/lirc-0.10.1/tools/irsimsend.cpp:75:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(plugindir, s != NULL ? s : PLUGINDIR, sizeof(plugindir) - 1); data/lirc-0.10.1/tools/irsimsend.cpp:202:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(last_code, code->name, sizeof(last_code)); data/lirc-0.10.1/tools/irsimsend.cpp:249:7: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. r = sscanf(line, "%*x %*x %32s %*s", keysym); data/lirc-0.10.1/tools/irsimsend.cpp:251:8: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. r = sscanf(line, "%32s", keysym); data/lirc-0.10.1/tools/irtestcase.cpp:133:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). i = read(fd, buff, size); data/lirc-0.10.1/tools/irtestcase.cpp:156:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(TESTDATA_DELAY); data/lirc-0.10.1/tools/irw.cpp:85:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(addr.sun_path, argv[optind], sizeof(addr.sun_path) - 1); data/lirc-0.10.1/tools/irw.cpp:101:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). i = read(fd, buf, 128); data/lirc-0.10.1/tools/irxevent.cpp:162:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!strncmp(wname, name, strlen(name))) { data/lirc-0.10.1/tools/irxevent.cpp:173:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!strncmp(iname, name, strlen(name))) { data/lirc-0.10.1/tools/irxevent.cpp:406:11: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). part2 = strncpy(part2, part, 128); data/lirc-0.10.1/tools/irxevent.cpp:498:2: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(20000); data/lirc-0.10.1/tools/irxevent.cpp:518:2: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(1000); data/lirc-0.10.1/tools/irxevent.cpp:547: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). buffer = (char*) malloc(strlen(s) + 1); data/lirc-0.10.1/tools/lirc-lsplugins.cpp:179: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). buff = (char*) alloca(strlen(arg) + 1); data/lirc-0.10.1/tools/lirc-lsplugins.cpp:183:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(token) + pos > 80) { data/lirc-0.10.1/tools/lirc-lsplugins.cpp:192:10: [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). pos += strlen(token); data/lirc-0.10.1/tools/lirc-lsplugins.cpp:332:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buf, (*drivers)->name, sizeof(buf) - 1); data/lirc-0.10.1/tools/lirc-lsplugins.cpp:336:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buf, data/lirc-0.10.1/tools/lirc-lsplugins.cpp:341:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buf, (*drivers)->info, sizeof(buf) - 1); data/lirc-0.10.1/tools/lirc-lsplugins.cpp:345:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buf, (*drivers)->device, sizeof(buf) - 1); data/lirc-0.10.1/tools/lirc-lsplugins.cpp:349:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buf, (*drivers)->device_hint, sizeof(buf) - 1); data/lirc-0.10.1/tools/lirc-lsremotes.cpp:64:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buff, path, size - 1); data/lirc-0.10.1/tools/lirc-lsremotes.cpp:70:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(pattern, dir, sizeof(pattern) - 1); data/lirc-0.10.1/tools/lirc-lsremotes.cpp:71:2: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant character. strncat(pattern, "/", sizeof(pattern) - strlen(pattern) - 1); data/lirc-0.10.1/tools/lirc-lsremotes.cpp:71: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). strncat(pattern, "/", sizeof(pattern) - strlen(pattern) - 1); data/lirc-0.10.1/tools/lirc-lsremotes.cpp:72:2: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(pattern, base, sizeof(pattern) - strlen(pattern) - 1); data/lirc-0.10.1/tools/lirc-lsremotes.cpp:72: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). strncat(pattern, base, sizeof(pattern) - strlen(pattern) - 1); data/lirc-0.10.1/tools/lirc-lsremotes.cpp:73:2: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(pattern, ".lircmd.conf", sizeof(pattern) - strlen(pattern) - 1); data/lirc-0.10.1/tools/lirc-lsremotes.cpp:73:53: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncat(pattern, ".lircmd.conf", sizeof(pattern) - strlen(pattern) - 1); data/lirc-0.10.1/tools/lirc-lsremotes.cpp:75:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buff, basename(pattern), size - 1); data/lirc-0.10.1/tools/lirc-lsremotes.cpp:91:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(try_buff, path, sizeof(try_buff)); data/lirc-0.10.1/tools/lirc-lsremotes.cpp:99:3: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(try_buff, data/lirc-0.10.1/tools/lirc-lsremotes.cpp:101:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). sizeof(try_buff) - strlen(try_buff) -1); data/lirc-0.10.1/tools/lirc-lsremotes.cpp:109:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buff, basename(try_buff), size); data/lirc-0.10.1/tools/lirc-lsremotes.cpp:126:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(my_path, path, sizeof(my_path)); data/lirc-0.10.1/tools/lirc-lsremotes.cpp:142:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(photo, path, sizeof(photo)); data/lirc-0.10.1/tools/lirc-lsremotes.cpp:210: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(dirname) > 0 && dirname[0] == '.') data/lirc-0.10.1/tools/mode2.cpp:133:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(level, env_level, sizeof(level) - 1); data/lirc-0.10.1/tools/mode2.cpp:135:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(level, lircd_level, sizeof(level) - 1); data/lirc-0.10.1/tools/mode2.cpp:413:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). r = read(fd, input.buffer, bytes); data/lirc-0.10.1/tools/xmode2.cpp:159:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(level, lircd_level, sizeof(level) - 1); data/lirc-0.10.1/tools/xmode2.cpp:241:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(driver, data/lirc-0.10.1/tools/xmode2.cpp:311:55: [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). XDrawString(d1, w1, gc2, w1_w - 100, 10, textbuffer, strlen(textbuffer)); data/lirc-0.10.1/tools/xmode2.cpp:457:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(textbuffer)); ANALYSIS SUMMARY: Hits = 973 Lines analyzed = 51493 in approximately 1.40 seconds (36807 lines/second) Physical Source Lines of Code (SLOC) = 37201 Hits@level = [0] 434 [1] 354 [2] 452 [3] 46 [4] 111 [5] 10 Hits@level+ = [0+] 1407 [1+] 973 [2+] 619 [3+] 167 [4+] 121 [5+] 10 Hits/KSLOC@level+ = [0+] 37.8216 [1+] 26.1552 [2+] 16.6393 [3+] 4.48913 [4+] 3.2526 [5+] 0.26881 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.