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/ckb-next-0.4.2+dfsg.1/src/animations/gradient/main.c
Examining data/ckb-next-0.4.2+dfsg.1/src/animations/heat/main.c
Examining data/ckb-next-0.4.2+dfsg.1/src/animations/invaders/main.c
Examining data/ckb-next-0.4.2+dfsg.1/src/animations/life/main.c
Examining data/ckb-next-0.4.2+dfsg.1/src/animations/mviz/main.c
Examining data/ckb-next-0.4.2+dfsg.1/src/animations/pinwheel/main.c
Examining data/ckb-next-0.4.2+dfsg.1/src/animations/pipe/main.c
Examining data/ckb-next-0.4.2+dfsg.1/src/animations/rain/main.c
Examining data/ckb-next-0.4.2+dfsg.1/src/animations/random/main.c
Examining data/ckb-next-0.4.2+dfsg.1/src/animations/ripple/main.c
Examining data/ckb-next-0.4.2+dfsg.1/src/animations/snake/main.c
Examining data/ckb-next-0.4.2+dfsg.1/src/animations/wave/main.c
Examining data/ckb-next-0.4.2+dfsg.1/src/daemon/command.c
Examining data/ckb-next-0.4.2+dfsg.1/src/daemon/command.h
Examining data/ckb-next-0.4.2+dfsg.1/src/daemon/device.c
Examining data/ckb-next-0.4.2+dfsg.1/src/daemon/device.h
Examining data/ckb-next-0.4.2+dfsg.1/src/daemon/device_keyboard.c
Examining data/ckb-next-0.4.2+dfsg.1/src/daemon/device_mouse.c
Examining data/ckb-next-0.4.2+dfsg.1/src/daemon/device_vtable.c
Examining data/ckb-next-0.4.2+dfsg.1/src/daemon/devnode.c
Examining data/ckb-next-0.4.2+dfsg.1/src/daemon/dpi.c
Examining data/ckb-next-0.4.2+dfsg.1/src/daemon/dpi.h
Examining data/ckb-next-0.4.2+dfsg.1/src/daemon/dpi_legacy.c
Examining data/ckb-next-0.4.2+dfsg.1/src/daemon/dpi_legacy.h
Examining data/ckb-next-0.4.2+dfsg.1/src/daemon/extra_mac.c
Examining data/ckb-next-0.4.2+dfsg.1/src/daemon/firmware.c
Examining data/ckb-next-0.4.2+dfsg.1/src/daemon/firmware.h
Examining data/ckb-next-0.4.2+dfsg.1/src/daemon/includes.h
Examining data/ckb-next-0.4.2+dfsg.1/src/daemon/input.c
Examining data/ckb-next-0.4.2+dfsg.1/src/daemon/input.h
Examining data/ckb-next-0.4.2+dfsg.1/src/daemon/input_linux.c
Examining data/ckb-next-0.4.2+dfsg.1/src/daemon/input_mac.c
Examining data/ckb-next-0.4.2+dfsg.1/src/daemon/input_mac_legacy.c
Examining data/ckb-next-0.4.2+dfsg.1/src/daemon/input_mac_vhid.h
Examining data/ckb-next-0.4.2+dfsg.1/src/daemon/keymap.c
Examining data/ckb-next-0.4.2+dfsg.1/src/daemon/keymap.h
Examining data/ckb-next-0.4.2+dfsg.1/src/daemon/keymap_mac.h
Examining data/ckb-next-0.4.2+dfsg.1/src/daemon/keymap_mac_legacy.h
Examining data/ckb-next-0.4.2+dfsg.1/src/daemon/keymap_patch.c
Examining data/ckb-next-0.4.2+dfsg.1/src/daemon/keymap_patch.h
Examining data/ckb-next-0.4.2+dfsg.1/src/daemon/led.c
Examining data/ckb-next-0.4.2+dfsg.1/src/daemon/led.h
Examining data/ckb-next-0.4.2+dfsg.1/src/daemon/led_keyboard.c
Examining data/ckb-next-0.4.2+dfsg.1/src/daemon/led_mouse.c
Examining data/ckb-next-0.4.2+dfsg.1/src/daemon/led_mousepad.c
Examining data/ckb-next-0.4.2+dfsg.1/src/daemon/main.c
Examining data/ckb-next-0.4.2+dfsg.1/src/daemon/notify.c
Examining data/ckb-next-0.4.2+dfsg.1/src/daemon/notify.h
Examining data/ckb-next-0.4.2+dfsg.1/src/daemon/os.h
Examining data/ckb-next-0.4.2+dfsg.1/src/daemon/profile.c
Examining data/ckb-next-0.4.2+dfsg.1/src/daemon/profile.h
Examining data/ckb-next-0.4.2+dfsg.1/src/daemon/profile_keyboard.c
Examining data/ckb-next-0.4.2+dfsg.1/src/daemon/profile_mouse.c
Examining data/ckb-next-0.4.2+dfsg.1/src/daemon/protocol.h
Examining data/ckb-next-0.4.2+dfsg.1/src/daemon/request_hid_mac.c
Examining data/ckb-next-0.4.2+dfsg.1/src/daemon/request_hid_mac.h
Examining data/ckb-next-0.4.2+dfsg.1/src/daemon/structures.h
Examining data/ckb-next-0.4.2+dfsg.1/src/daemon/usb.c
Examining data/ckb-next-0.4.2+dfsg.1/src/daemon/usb.h
Examining data/ckb-next-0.4.2+dfsg.1/src/daemon/usb_linux.c
Examining data/ckb-next-0.4.2+dfsg.1/src/daemon/usb_mac.c
Examining data/ckb-next-0.4.2+dfsg.1/src/daemon/devnode.h
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/animadddialog.cpp
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/animadddialog.h
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/animdetailsdialog.cpp
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/animdetailsdialog.h
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/animscript.cpp
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/animscript.h
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/animsettingdialog.cpp
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/animsettingdialog.h
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/autorun.cpp
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/autorun.h
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/ckbsettings.cpp
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/ckbsettings.h
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/ckbsettingswriter.cpp
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/ckbsettingswriter.h
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/ckbsystemtrayicon.cpp
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/ckbsystemtrayicon.h
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/ckbupdater.cpp
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/ckbupdater.h
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/ckbupdaterwidget.cpp
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/ckbupdaterwidget.h
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/colorbutton.cpp
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/colorbutton.h
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/colormap.cpp
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/colormap.h
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/extrasettingswidget.cpp
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/extrasettingswidget.h
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/fwupgradedialog.cpp
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/fwupgradedialog.h
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/gradientbutton.cpp
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/gradientbutton.h
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/gradientdialog.cpp
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/gradientdialog.h
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/gradientdialogwidget.cpp
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/gradientdialogwidget.h
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/kb.cpp
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/kb.h
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/kbanim.cpp
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/kbanim.h
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/kbanimwidget.cpp
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/kbanimwidget.h
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/kbbind.cpp
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/kbbind.h
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/kbbindwidget.cpp
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/kbbindwidget.h
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/kbfirmware.cpp
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/kbfirmware.h
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/kblight.cpp
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/kblight.h
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/kblightwidget.cpp
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/kblightwidget.h
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/kbmanager.cpp
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/kbmanager.h
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/kbmode.cpp
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/kbmode.h
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/kbperf.cpp
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/kbperf.h
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/kbprofile.cpp
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/kbprofile.h
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/kbprofiledialog.cpp
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/kbprofiledialog.h
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/kbwidget.cpp
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/kbwidget.h
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/keyaction.cpp
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/keyaction.h
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/keymap.cpp
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/keymap.h
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/keywidget.cpp
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/keywidget.h
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/kperfwidget.cpp
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/kperfwidget.h
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/macroreader.cpp
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/macroreader.h
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/main.cpp
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/mainwindow.cpp
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/mainwindow.h
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/media.h
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/media_linux.cpp
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/modeselectdialog.cpp
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/modeselectdialog.h
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/mperfwidget.cpp
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/mperfwidget.h
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/nowheelcombobox.cpp
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/nowheelcombobox.h
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/qoverloadlegacy.h
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/rebindwidget.cpp
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/rebindwidget.h
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/rlistwidget.cpp
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/rlistwidget.h
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/settingswidget.cpp
Examining data/ckb-next-0.4.2+dfsg.1/src/gui/settingswidget.h
Examining data/ckb-next-0.4.2+dfsg.1/src/libs/ckb-next/include/ckb-next/animation.h
Examining data/ckb-next-0.4.2+dfsg.1/src/libs/kissfft/include/kissfft/_kiss_fft_guts.h
Examining data/ckb-next-0.4.2+dfsg.1/src/libs/kissfft/include/kissfft/kiss_fft.h
Examining data/ckb-next-0.4.2+dfsg.1/src/libs/kissfft/include/kissfft/kiss_fftr.h
Examining data/ckb-next-0.4.2+dfsg.1/src/libs/kissfft/kiss_fft.c
Examining data/ckb-next-0.4.2+dfsg.1/src/libs/kissfft/kiss_fftr.c

FINAL RESULTS:

data/ckb-next-0.4.2+dfsg.1/src/daemon/devnode.c:41:13:  [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(pathname, owner, group) < 0) {
data/ckb-next-0.4.2+dfsg.1/src/daemon/devnode.c:58:8:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
    if(chmod(pathname, mode) < 0) {
data/ckb-next-0.4.2+dfsg.1/src/daemon/command.c:77: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.
    while(sscanf(line, "%s%n", word, &wordlen) == 1){
data/ckb-next-0.4.2+dfsg.1/src/daemon/dpi.c:94:9:  [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(buffer + length, BUFFER_LEN - length, length == 0 ? "%d%n" : " %d%n", i, &newlen);
data/ckb-next-0.4.2+dfsg.1/src/daemon/includes.h:47:49:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define ckb_fatal_nofile(fmt, args...)          fprintf(ckb_s_err, "[F] " fmt, ## args)
data/ckb-next-0.4.2+dfsg.1/src/daemon/includes.h:48:49:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define ckb_fatal_fn(fmt, file, line, args...)  fprintf(ckb_s_err, "[F] %s (via %s:%d): " fmt, __func__, file, line, ## args)
data/ckb-next-0.4.2+dfsg.1/src/daemon/includes.h:49:49:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define ckb_fatal(fmt, args...)                 fprintf(ckb_s_err, "[F] %s (%s:%d): " fmt, __func__, __FILE_NOPATH__, __LINE__, ## args)
data/ckb-next-0.4.2+dfsg.1/src/daemon/includes.h:50:49:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define ckb_err_nofile(fmt, args...)            fprintf(ckb_s_err, "[E] " fmt, ## args)
data/ckb-next-0.4.2+dfsg.1/src/daemon/includes.h:51:49:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define ckb_err_fn(fmt, file, line, args...)    fprintf(ckb_s_err, "[E] %s (via %s:%d): " fmt, __func__, file, line, ## args)
data/ckb-next-0.4.2+dfsg.1/src/daemon/includes.h:52:49:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define ckb_err(fmt, args...)                   fprintf(ckb_s_err, "[E] %s (%s:%d): " fmt, __func__, __FILE_NOPATH__, __LINE__, ## args)
data/ckb-next-0.4.2+dfsg.1/src/daemon/includes.h:53:49:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define ckb_warn_nofile(fmt, args...)           fprintf(ckb_s_out, "[W] " fmt, ## args)
data/ckb-next-0.4.2+dfsg.1/src/daemon/includes.h:54:49:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define ckb_warn_fn(fmt, file, line, args...)   fprintf(ckb_s_out, "[W] %s (via %s:%d): " fmt, __func__, file, line, ## args)
data/ckb-next-0.4.2+dfsg.1/src/daemon/includes.h:55:49:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define ckb_warn(fmt, args...)                  fprintf(ckb_s_out, "[W] %s (%s:%d): " fmt, __func__, __FILE_NOPATH__, __LINE__, ## args)
data/ckb-next-0.4.2+dfsg.1/src/daemon/includes.h:56:49:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define ckb_info_nofile(fmt, args...)           fprintf(ckb_s_out, "[I] " fmt, ## args)
data/ckb-next-0.4.2+dfsg.1/src/daemon/includes.h:57:49:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define ckb_info_fn(fmt, file, line, args...)   fprintf(ckb_s_out, "[I] " fmt, ## args)
data/ckb-next-0.4.2+dfsg.1/src/daemon/includes.h:58:49:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define ckb_info(fmt, args...)                  fprintf(ckb_s_out, "[I] " fmt, ## args)
data/ckb-next-0.4.2+dfsg.1/src/daemon/input.c:435:17:  [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(keyname, real_keyname); // keyname[24], real_keyname[12]
data/ckb-next-0.4.2+dfsg.1/src/daemon/input_linux.c:66:12:  [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("modprobe uinput") != 0) {
data/ckb-next-0.4.2+dfsg.1/src/daemon/input_mac.c:63:9:  [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.
        system("kextutil " VIRTUAL_HID_KEXT_PATH );
data/ckb-next-0.4.2+dfsg.1/src/daemon/led.c:167:9:  [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(buffer + length, BUFFER_LEN - length, length == 0 ? "%s%n" : " %s%n", names[i], &newlen);
data/ckb-next-0.4.2+dfsg.1/src/daemon/main.c:132:13:  [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(
data/ckb-next-0.4.2+dfsg.1/src/daemon/usb_linux.c:356:9:  [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(finalpath, path);
data/ckb-next-0.4.2+dfsg.1/src/daemon/usb_linux.c:360:9:  [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(finalpath, epstr);
data/ckb-next-0.4.2+dfsg.1/src/gui/gradientbutton.cpp:85:26:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
        result << string.sprintf("%d:%02x%02x%02x%02x", (int)round(stop.first * 100.f), color.alpha(), color.red(), color.green(), color.blue());
data/ckb-next-0.4.2+dfsg.1/src/gui/kblight.cpp:388:29:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        cmd.write(QString().sprintf("rgb 000000").toLatin1());
data/ckb-next-0.4.2+dfsg.1/src/libs/ckb-next/include/ckb-next/animation.h:76:103:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define CKB_PARAM_BOOL(name, text, default)                         CKB_PARAM("bool", name, text, "", printf((default) ? "1" : "0"))
data/ckb-next-0.4.2+dfsg.1/src/libs/ckb-next/include/ckb-next/animation.h:178:27:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define DBG(str, args...) fprintf(stderr, str"\n", ## args);
data/ckb-next-0.4.2+dfsg.1/src/libs/ckb-next/include/ckb-next/animation.h:249:15:  [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.
    int res = sscanf(line, "%s %s %s", word1, word2, word3);
data/ckb-next-0.4.2+dfsg.1/src/animations/gradient/main.c:60:5:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    srand((unsigned)time(NULL));
data/ckb-next-0.4.2+dfsg.1/src/animations/invaders/main.c:63:5:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    srand(time(NULL));
data/ckb-next-0.4.2+dfsg.1/src/animations/rain/main.c:64:5:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    srand(time(NULL));
data/ckb-next-0.4.2+dfsg.1/src/animations/random/main.c:65:5:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    srand(time(NULL));
data/ckb-next-0.4.2+dfsg.1/src/animations/ripple/main.c:57:5:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    srand((unsigned)time(NULL));
data/ckb-next-0.4.2+dfsg.1/src/animations/life/main.c:147:13:  [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(adjacencygraph, gridygraph, sizeof(gridygraph));
data/ckb-next-0.4.2+dfsg.1/src/animations/life/main.c:185:9:  [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(livmap, keystate, sizeof(keystate));
data/ckb-next-0.4.2+dfsg.1/src/animations/pipe/main.c:36: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 fifoname[FIFO_NAME_LEN] = { 0 }; // /tmp/ckbpipeNNN
data/ckb-next-0.4.2+dfsg.1/src/animations/pipe/main.c:45: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.
        sprintf(fifoname, "/tmp/ckbpipe%03hhu", (unsigned char)fifonum);
data/ckb-next-0.4.2+dfsg.1/src/animations/pipe/main.c:48: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 = open(fifoname, O_RDONLY | O_NONBLOCK);
data/ckb-next-0.4.2+dfsg.1/src/animations/pipe/main.c:65:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char input[MAX_INPUT] = { 0 };
data/ckb-next-0.4.2+dfsg.1/src/animations/pipe/main.c:106: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.
            char key_name[MAX_INPUT] = { 0 };
data/ckb-next-0.4.2+dfsg.1/src/daemon/command.c:310: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 keyname[11] = { 0 };
data/ckb-next-0.4.2+dfsg.1/src/daemon/device.c:109:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char devlist[12*(DEV_MAX-1)+1];
data/ckb-next-0.4.2+dfsg.1/src/daemon/device.c:112:23:  [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.
        devlistpos += sprintf(&devlist[devlistpos], "%u: 0x%x; ", i, keyboard[i].product);
data/ckb-next-0.4.2+dfsg.1/src/daemon/devnode.c:29: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 path2[FILENAME_MAX];
data/ckb-next-0.4.2+dfsg.1/src/daemon/devnode.c:83:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char cpath[strlen(devpath) + 12];
data/ckb-next-0.4.2+dfsg.1/src/daemon/devnode.c:85:19:  [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).
    FILE* cfile = fopen(cpath, "w");
data/ckb-next-0.4.2+dfsg.1/src/daemon/devnode.c:122:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char outpath[strlen(devpath) + 10 * sizeof(char)];
data/ckb-next-0.4.2+dfsg.1/src/daemon/devnode.c:124:67:  [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(mkfifo(outpath, S_GID_READ) != 0 || (kb->outfifo[notify] = open(outpath, O_RDWR | O_NONBLOCK) + 1) == 0){
data/ckb-next-0.4.2+dfsg.1/src/daemon/devnode.c:147:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char outpath[strlen(devpath) + 10 * sizeof(char)];
data/ckb-next-0.4.2+dfsg.1/src/daemon/devnode.c:165:18:  [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).
    FILE* file = fopen(path, "w");
data/ckb-next-0.4.2+dfsg.1/src/daemon/devnode.c:197:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[strlen(devpath) + 2];
data/ckb-next-0.4.2+dfsg.1/src/daemon/devnode.c:215: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 vpath[sizeof(path) + 8];
data/ckb-next-0.4.2+dfsg.1/src/daemon/devnode.c:217:23:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        FILE* vfile = fopen(vpath, "w");
data/ckb-next-0.4.2+dfsg.1/src/daemon/devnode.c:228: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 ppath[sizeof(path) + 4];
data/ckb-next-0.4.2+dfsg.1/src/daemon/devnode.c:230:23:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        FILE* pfile = fopen(ppath, "w");
data/ckb-next-0.4.2+dfsg.1/src/daemon/devnode.c:242: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 inpath[sizeof(path) + 4];
data/ckb-next-0.4.2+dfsg.1/src/daemon/devnode.c:246:34:  [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).
                || (kb->infifo = open(inpath, O_RDWR) + 1) == 0){
data/ckb-next-0.4.2+dfsg.1/src/daemon/devnode.c:260: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 mpath[sizeof(path) + 6], spath[sizeof(path) + 7], ipath[sizeof(path) + 10], lpath[sizeof(path) + 7], dpath[sizeof(path) + 4];
data/ckb-next-0.4.2+dfsg.1/src/daemon/devnode.c:267: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 productid[5];
data/ckb-next-0.4.2+dfsg.1/src/daemon/devnode.c:270: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 dpistr[6] = ""; // ushort max
data/ckb-next-0.4.2+dfsg.1/src/daemon/devnode.c:285: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 fpath[sizeof(path) + 9];
data/ckb-next-0.4.2+dfsg.1/src/daemon/devnode.c:287:23:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        FILE* ffile = fopen(fpath, "w");
data/ckb-next-0.4.2+dfsg.1/src/daemon/devnode.c:344:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[strlen(devpath) + 2];
data/ckb-next-0.4.2+dfsg.1/src/daemon/devnode.c:358:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char fwpath[strlen(devpath) + 12];
data/ckb-next-0.4.2+dfsg.1/src/daemon/devnode.c:360:20:  [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).
    FILE* fwfile = fopen(fwpath, "w");
data/ckb-next-0.4.2+dfsg.1/src/daemon/devnode.c:372:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char ppath[strlen(devpath) + 11];
data/ckb-next-0.4.2+dfsg.1/src/daemon/devnode.c:374:19:  [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).
    FILE* pfile = fopen(ppath, "w");
data/ckb-next-0.4.2+dfsg.1/src/daemon/devnode.c:413:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(buffer, buffer + leftover, leftoverlen);
data/ckb-next-0.4.2+dfsg.1/src/daemon/dpi.c:27:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char stagename[3];
data/ckb-next-0.4.2+dfsg.1/src/daemon/dpi.c:200:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(lastdpi, newdpi, sizeof(dpiset));
data/ckb-next-0.4.2+dfsg.1/src/daemon/dpi_legacy.c:65:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(lastdpi, newdpi, sizeof(dpiset));
data/ckb-next-0.4.2+dfsg.1/src/daemon/firmware.c:30:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char ident_str[3*MSG_SIZE+1] = "";
data/ckb-next-0.4.2+dfsg.1/src/daemon/firmware.c:33: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.
        sprintf(ident_str + (3 * i), "%02hhx ", in_pkt[i]);
data/ckb-next-0.4.2+dfsg.1/src/daemon/firmware.c:38:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&version, in_pkt + 8, 2);
data/ckb-next-0.4.2+dfsg.1/src/daemon/firmware.c:39:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&bootloader, in_pkt + 10, 2);
data/ckb-next-0.4.2+dfsg.1/src/daemon/firmware.c:40:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&vendor, in_pkt + 12, 2);
data/ckb-next-0.4.2+dfsg.1/src/daemon/firmware.c:41:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&product, in_pkt + 14, 2);
data/ckb-next-0.4.2+dfsg.1/src/daemon/firmware.c:81: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).
    int fd = open(path, O_RDONLY);
data/ckb-next-0.4.2+dfsg.1/src/daemon/firmware.c:98:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&vendor, fwdata + 0x102, 2);
data/ckb-next-0.4.2+dfsg.1/src/daemon/firmware.c:99:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&product, fwdata + 0x104, 2);
data/ckb-next-0.4.2+dfsg.1/src/daemon/firmware.c:100:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&version, fwdata + 0x106, 2);
data/ckb-next-0.4.2+dfsg.1/src/daemon/firmware.c:131:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(data_pkt[npackets] + 4, fwdata + output, 60);
data/ckb-next-0.4.2+dfsg.1/src/daemon/firmware.c:136:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(data_pkt[npackets] + 4, fwdata + output, 16);
data/ckb-next-0.4.2+dfsg.1/src/daemon/input.c:274:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(input->prevkeys, input->keys, N_KEYBYTES_INPUT);
data/ckb-next-0.4.2+dfsg.1/src/daemon/input.c:387:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[24];
data/ckb-next-0.4.2+dfsg.1/src/daemon/input.c:430: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 real_keyname[12];  // temp to hold the left side (key) of the <key>=<delay>
data/ckb-next-0.4.2+dfsg.1/src/daemon/input.c:474:21:  [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(macros + j - 1, macros + j, sizeof(keymacro));
data/ckb-next-0.4.2+dfsg.1/src/daemon/input.c:478:17:  [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(macros + i, &macro, sizeof(keymacro));
data/ckb-next-0.4.2+dfsg.1/src/daemon/input.c:486:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(bind->macros + (bind->macrocount++), &macro, sizeof(keymacro));
data/ckb-next-0.4.2+dfsg.1/src/daemon/input_linux.c:10: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).
    int fd = open("/dev/uinput", O_RDWR);
data/ckb-next-0.4.2+dfsg.1/src/daemon/input_linux.c:13: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 = open("/dev/input/uinput", O_RDWR);
data/ckb-next-0.4.2+dfsg.1/src/daemon/input_linux.c:59: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).
    int fd = open("/dev/uinput", O_RDWR);
data/ckb-next-0.4.2+dfsg.1/src/daemon/input_linux.c:61:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        fd = open("/dev/input/uinput", O_RDWR);
data/ckb-next-0.4.2+dfsg.1/src/daemon/input_linux.c:83:5:  [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(indev.name, " vKB");
data/ckb-next-0.4.2+dfsg.1/src/daemon/input_linux.c:95:5:  [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(indev.name, " vM");
data/ckb-next-0.4.2+dfsg.1/src/daemon/input_linux.c:220:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char ledthread_name[THREAD_NAME_MAX] = "ckbX led";
data/ckb-next-0.4.2+dfsg.1/src/daemon/input_mac.c:155:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char indicthread_name[THREAD_NAME_MAX] = "ckbX indicator";
data/ckb-next-0.4.2+dfsg.1/src/daemon/input_mac_legacy.c:208:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char osx_version_buf[256];
data/ckb-next-0.4.2+dfsg.1/src/daemon/input_mac_legacy.c:211:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char osx_version[3];
data/ckb-next-0.4.2+dfsg.1/src/daemon/input_mac_legacy.c:213:15:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    osx_ver = atoi(osx_version);
data/ckb-next-0.4.2+dfsg.1/src/daemon/input_mac_legacy.c:304:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char indicthread_name[THREAD_NAME_MAX] = "ckbX indicator";
data/ckb-next-0.4.2+dfsg.1/src/daemon/keymap.c:336:9:  [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(kb->interruptbuf, buffer, MSG_SIZE);
data/ckb-next-0.4.2+dfsg.1/src/daemon/keymap.c:526:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(kbinput, urbinput, N_KEYBYTES_HW);
data/ckb-next-0.4.2+dfsg.1/src/daemon/keymap_patch.c:47:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(kb->keymap, keymap, sizeof(keymap));
data/ckb-next-0.4.2+dfsg.1/src/daemon/led.c:135:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char names[N_KEYS_EXTENDED][11];
data/ckb-next-0.4.2+dfsg.1/src/daemon/led_keyboard.c:60:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(data_pkt[0] + 4, r, 60);
data/ckb-next-0.4.2+dfsg.1/src/daemon/led_keyboard.c:61:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(data_pkt[1] + 4, r + 60, 12);
data/ckb-next-0.4.2+dfsg.1/src/daemon/led_keyboard.c:62:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(data_pkt[1] + 16, g, 48);
data/ckb-next-0.4.2+dfsg.1/src/daemon/led_keyboard.c:63:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(data_pkt[2] + 4, g + 48, 24);
data/ckb-next-0.4.2+dfsg.1/src/daemon/led_keyboard.c:64:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(data_pkt[2] + 28, b, 36);
data/ckb-next-0.4.2+dfsg.1/src/daemon/led_keyboard.c:65:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(data_pkt[3] + 4, b + 36, 36);
data/ckb-next-0.4.2+dfsg.1/src/daemon/led_keyboard.c:71:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(data_pkt[0] + 4, r, 60);
data/ckb-next-0.4.2+dfsg.1/src/daemon/led_keyboard.c:72:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(data_pkt[1] + 4, r + 60, 60);
data/ckb-next-0.4.2+dfsg.1/src/daemon/led_keyboard.c:73:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(data_pkt[2] + 4, r + 120, 60);
data/ckb-next-0.4.2+dfsg.1/src/daemon/led_keyboard.c:75:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(data_pkt[4] + 4, g, 60);
data/ckb-next-0.4.2+dfsg.1/src/daemon/led_keyboard.c:76:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(data_pkt[5] + 4, g + 60, 60);
data/ckb-next-0.4.2+dfsg.1/src/daemon/led_keyboard.c:77:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(data_pkt[6] + 4, g + 120, 60);
data/ckb-next-0.4.2+dfsg.1/src/daemon/led_keyboard.c:79:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(data_pkt[8] + 4, b, 60);
data/ckb-next-0.4.2+dfsg.1/src/daemon/led_keyboard.c:80:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(data_pkt[9] + 4, b + 60, 60);
data/ckb-next-0.4.2+dfsg.1/src/daemon/led_keyboard.c:81:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(data_pkt[10] + 4, b + 120, 60);
data/ckb-next-0.4.2+dfsg.1/src/daemon/led_keyboard.c:182:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(lastlight, newlight, sizeof(lighting));
data/ckb-next-0.4.2+dfsg.1/src/daemon/led_keyboard.c:294:13:  [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(colors[clr], in_pkt[1] + 4, 60);
data/ckb-next-0.4.2+dfsg.1/src/daemon/led_keyboard.c:295:13:  [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(colors[clr] + 60, in_pkt[2] + 4, 60);
data/ckb-next-0.4.2+dfsg.1/src/daemon/led_keyboard.c:296:13:  [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(colors[clr] + 120, in_pkt[3] + 4, 24);
data/ckb-next-0.4.2+dfsg.1/src/daemon/led_keyboard.c:326:9:  [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(mr,      in_pkt[0] +  4, 60);
data/ckb-next-0.4.2+dfsg.1/src/daemon/led_keyboard.c:327:9:  [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(mr + 60, in_pkt[1] +  4, 12);
data/ckb-next-0.4.2+dfsg.1/src/daemon/led_keyboard.c:328:9:  [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(mg,      in_pkt[1] + 16, 48);
data/ckb-next-0.4.2+dfsg.1/src/daemon/led_keyboard.c:329:9:  [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(mg + 48, in_pkt[2] +  4, 24);
data/ckb-next-0.4.2+dfsg.1/src/daemon/led_keyboard.c:330:9:  [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(mb,      in_pkt[2] + 28, 36);
data/ckb-next-0.4.2+dfsg.1/src/daemon/led_keyboard.c:331:9:  [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(mb + 36, in_pkt[3] +  4, 36);
data/ckb-next-0.4.2+dfsg.1/src/daemon/led_mouse.c:39:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(lastlight, newlight, sizeof(lighting));
data/ckb-next-0.4.2+dfsg.1/src/daemon/led_mousepad.c:35:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(lastlight, newlight, sizeof(lighting));
data/ckb-next-0.4.2+dfsg.1/src/daemon/main.c:176:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char pidpath[strlen(devpath) + 6];
data/ckb-next-0.4.2+dfsg.1/src/daemon/main.c:178:21:  [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).
    FILE* pidfile = fopen(pidpath, "r");
data/ckb-next-0.4.2+dfsg.1/src/daemon/main.c:199: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 hwload[7];
data/ckb-next-0.4.2+dfsg.1/src/daemon/profile.c:72:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(id->guid + 0x0, &data1, 4);
data/ckb-next-0.4.2+dfsg.1/src/daemon/profile.c:73:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(id->guid + 0x4, &data2, 2);
data/ckb-next-0.4.2+dfsg.1/src/daemon/profile.c:74:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(id->guid + 0x6, &data3, 2);
data/ckb-next-0.4.2+dfsg.1/src/daemon/profile.c:75:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(id->guid + 0x8, &data4a, 2);
data/ckb-next-0.4.2+dfsg.1/src/daemon/profile.c:76:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(id->guid + 0xA, data4b, 6);
data/ckb-next-0.4.2+dfsg.1/src/daemon/profile.c:84:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&data1, id->guid + 0x0, 4);
data/ckb-next-0.4.2+dfsg.1/src/daemon/profile.c:85:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&data2, id->guid + 0x4, 2);
data/ckb-next-0.4.2+dfsg.1/src/daemon/profile.c:86:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&data3, id->guid + 0x6, 2);
data/ckb-next-0.4.2+dfsg.1/src/daemon/profile.c:87:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&data4a, id->guid + 0x8, 2);
data/ckb-next-0.4.2+dfsg.1/src/daemon/profile.c:88:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(data4b, id->guid + 0xA, 6);
data/ckb-next-0.4.2+dfsg.1/src/daemon/profile.c:121:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char decoded[strlen(name) + 1];
data/ckb-next-0.4.2+dfsg.1/src/daemon/profile.c:133:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char decoded[strlen(name) + 1];
data/ckb-next-0.4.2+dfsg.1/src/daemon/profile.c:175:9:  [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(mode->id.modified, &newmodified, sizeof(newmodified));
data/ckb-next-0.4.2+dfsg.1/src/daemon/profile.c:186:9:  [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(profile->id.modified, &newmodified, sizeof(newmodified));
data/ckb-next-0.4.2+dfsg.1/src/daemon/profile.c:261:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(profile->name, hw->name[0], PR_NAME_LEN * 2);
data/ckb-next-0.4.2+dfsg.1/src/daemon/profile.c:262:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&profile->id, hw->id, sizeof(usbid));
data/ckb-next-0.4.2+dfsg.1/src/daemon/profile.c:266:9:  [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(mode->name, hw->name[i + 1], MD_NAME_LEN * 2);
data/ckb-next-0.4.2+dfsg.1/src/daemon/profile.c:267:9:  [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(&mode->id, hw->id + i + 1, sizeof(usbid));
data/ckb-next-0.4.2+dfsg.1/src/daemon/profile.c:268:9:  [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(&mode->light, hw->light + i, sizeof(lighting));
data/ckb-next-0.4.2+dfsg.1/src/daemon/profile.c:269:9:  [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(&mode->dpi, hw->dpi + i, sizeof(dpiset));
data/ckb-next-0.4.2+dfsg.1/src/daemon/profile.c:278:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(hw->name[0], profile->name, PR_NAME_LEN * 2);
data/ckb-next-0.4.2+dfsg.1/src/daemon/profile.c:279:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(hw->id, &profile->id, sizeof(usbid));
data/ckb-next-0.4.2+dfsg.1/src/daemon/profile.c:283:9:  [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(hw->name[i + 1], mode->name, MD_NAME_LEN * 2);
data/ckb-next-0.4.2+dfsg.1/src/daemon/profile.c:284:9:  [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(hw->id + i + 1, &mode->id, sizeof(usbid));
data/ckb-next-0.4.2+dfsg.1/src/daemon/profile.c:285:9:  [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(hw->light + i, &mode->light, sizeof(lighting));
data/ckb-next-0.4.2+dfsg.1/src/daemon/profile.c:286:9:  [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(hw->dpi + i, &mode->dpi, sizeof(dpiset));
data/ckb-next-0.4.2+dfsg.1/src/daemon/profile_keyboard.c:11:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(hw->name[mode + 1], in_pkt + 4, MD_NAME_LEN * 2);
data/ckb-next-0.4.2+dfsg.1/src/daemon/profile_keyboard.c:36:9:  [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(hw->id + i, in_pkt + 4, sizeof(usbid));
data/ckb-next-0.4.2+dfsg.1/src/daemon/profile_keyboard.c:43:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(hw->name[0], in_pkt + 4, PR_NAME_LEN * 2);
data/ckb-next-0.4.2+dfsg.1/src/daemon/profile_keyboard.c:81:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(data_pkt[0] + 4, hw->name[i], MD_NAME_LEN * 2);
data/ckb-next-0.4.2+dfsg.1/src/daemon/profile_keyboard.c:88:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(data_pkt[1] + 4, hw->id + i, sizeof(usbid));
data/ckb-next-0.4.2+dfsg.1/src/daemon/profile_mouse.c:25:9:  [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(hw->id + i, in_pkt + 4, sizeof(usbid));
data/ckb-next-0.4.2+dfsg.1/src/daemon/profile_mouse.c:34:9:  [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(hw->name[i], in_pkt + 4, PR_NAME_LEN * 2);
data/ckb-next-0.4.2+dfsg.1/src/daemon/profile_mouse.c:72:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(data_pkt[0] + 4, hw->name[i], MD_NAME_LEN * 2);
data/ckb-next-0.4.2+dfsg.1/src/daemon/profile_mouse.c:79:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(data_pkt[1] + 4, hw->id + i, sizeof(usbid));
data/ckb-next-0.4.2+dfsg.1/src/daemon/structures.h:12:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char guid[16];
data/ckb-next-0.4.2+dfsg.1/src/daemon/structures.h:13:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char modified[4];
data/ckb-next-0.4.2+dfsg.1/src/daemon/structures.h:261:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[KB_NAME_LEN+1]; // increase by 1 for the trailing \0 for names that are exactly KB_NAME_LEN, e.g. "Corsair STRAFE RGB Gaming Keyboard"
data/ckb-next-0.4.2+dfsg.1/src/daemon/structures.h:263:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char serial[SERIAL_LEN];
data/ckb-next-0.4.2+dfsg.1/src/daemon/usb.c:402:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char inputthread_name[THREAD_NAME_MAX] = "ckbX input";
data/ckb-next-0.4.2+dfsg.1/src/daemon/usb.c:529:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char usbthread_name[THREAD_NAME_MAX] = "ckbX usb";
data/ckb-next-0.4.2+dfsg.1/src/daemon/usb.c:873:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char converted[actual_length * 3 + 1];
data/ckb-next-0.4.2+dfsg.1/src/daemon/usb.c:875: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.
        sprintf(&converted[i * 3], "%02x ", buffer[i]);
data/ckb-next-0.4.2+dfsg.1/src/daemon/usb_linux.c:16: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 kbsyspath[DEV_MAX][FILENAME_MAX];
data/ckb-next-0.4.2+dfsg.1/src/daemon/usb_linux.c:184:9:  [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_msg, kb->interruptbuf, MSG_SIZE);
data/ckb-next-0.4.2+dfsg.1/src/daemon/usb_linux.c:354: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 finalpath[strlen(path)+7];
data/ckb-next-0.4.2+dfsg.1/src/daemon/usb_linux.c:358: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 epstr[7];
data/ckb-next-0.4.2+dfsg.1/src/daemon/usb_linux.c:672:26:  [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).
            kb->handle = open(path, O_RDWR) + 1;
data/ckb-next-0.4.2+dfsg.1/src/daemon/usb_mac.c:101:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[256] = { 0 };
data/ckb-next-0.4.2+dfsg.1/src/daemon/usb_mac.c:205:9:  [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_msg, kb->interruptbuf, MSG_SIZE);
data/ckb-next-0.4.2+dfsg.1/src/daemon/usb_mac.c:350:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[10] = {0};
data/ckb-next-0.4.2+dfsg.1/src/daemon/usb_mac.c:351: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).
    FILE *fp = fopen("/tmp/ckb", "r");
data/ckb-next-0.4.2+dfsg.1/src/daemon/usb_mac.c:407:17:  [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(&mouse_event_tap_pid, &current_ckb_pid, sizeof mouse_event_tap_pid);
data/ckb-next-0.4.2+dfsg.1/src/daemon/usb_mac.c:419:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char inputthread_name[THREAD_NAME_MAX] = "ckbX input";
data/ckb-next-0.4.2+dfsg.1/src/daemon/usb_mac.c:613:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char location_var[18], location_fixed[18];
data/ckb-next-0.4.2+dfsg.1/src/daemon/usb_mac.c:937:35:  [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).
        wait_loop(err, (*handle)->open(handle, kIOHIDOptionsTypeSeizeDevice));
data/ckb-next-0.4.2+dfsg.1/src/gui/animscript.cpp:451: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.
            char keyName[31];
data/ckb-next-0.4.2+dfsg.1/src/gui/animscript.cpp:462:13:  [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(_colors.colors(), _colorBuffer.colors(), sizeof(QRgb) * _colors.count());
data/ckb-next-0.4.2+dfsg.1/src/gui/animsettingdialog.cpp:460: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 hex[7];
data/ckb-next-0.4.2+dfsg.1/src/gui/animsettingdialog.cpp:468: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 hex[9];
data/ckb-next-0.4.2+dfsg.1/src/gui/ckbupdaterwidget.cpp:96:20:  [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(outFile.open(QFile::WriteOnly)) {
data/ckb-next-0.4.2+dfsg.1/src/gui/colormap.cpp:24:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(_keyNames, rhs._keyNames, sizeof(const char*) * _count);
data/ckb-next-0.4.2+dfsg.1/src/gui/colormap.cpp:25:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(_colors, rhs._colors, sizeof(QRgb) * _count);
data/ckb-next-0.4.2+dfsg.1/src/gui/fwupgradedialog.cpp:50:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if(!output.open(QIODevice::WriteOnly)){
data/ckb-next-0.4.2+dfsg.1/src/gui/fwupgradedialog.cpp:85:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&version, bData + 0x106, 2);
data/ckb-next-0.4.2+dfsg.1/src/gui/kb.cpp:32:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (ftpath.open(QIODevice::ReadOnly)){
data/ckb-next-0.4.2+dfsg.1/src/gui/kb.cpp:54: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).
    if (mpath.open(QIODevice::ReadOnly)){
data/ckb-next-0.4.2+dfsg.1/src/gui/kb.cpp:61: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).
    if (spath.open(QIODevice::ReadOnly)){
data/ckb-next-0.4.2+dfsg.1/src/gui/kb.cpp:68:50:  [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 (features.contains("fwversion") && fwpath.open(QIODevice::ReadOnly)) {
data/ckb-next-0.4.2+dfsg.1/src/gui/kb.cpp:72:22:  [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 (prodpath.open(QIODevice::ReadOnly)) {
data/ckb-next-0.4.2+dfsg.1/src/gui/kb.cpp:79:48:  [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 (features.contains("pollrate") && ppath.open(QIODevice::ReadOnly)){
data/ckb-next-0.4.2+dfsg.1/src/gui/kb.cpp:87:21:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if(hwlayoutPath.open(QIODevice::ReadOnly)){
data/ckb-next-0.4.2+dfsg.1/src/gui/kb.cpp:93:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if(dpiPath.open(QIODevice::ReadOnly)){
data/ckb-next-0.4.2+dfsg.1/src/gui/kb.cpp:105: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).
    int fd = open(cmdpath.toLatin1().constData(), O_WRONLY | O_NONBLOCK);
data/ckb-next-0.4.2+dfsg.1/src/gui/kb.cpp:106: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(!cmd.open(fd, QIODevice::WriteOnly, QFileDevice::AutoCloseHandle))
data/ckb-next-0.4.2+dfsg.1/src/gui/kb.cpp:423:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        light->open();
data/ckb-next-0.4.2+dfsg.1/src/gui/kb.cpp:489:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if(!notify.open(QIODevice::ReadOnly)){
data/ckb-next-0.4.2+dfsg.1/src/gui/kb.cpp:493:23:  [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(notify.open(QIODevice::ReadOnly))
data/ckb-next-0.4.2+dfsg.1/src/gui/kbfirmware.cpp:87:22:  [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(!firmware.open(QIODevice::WriteOnly)
data/ckb-next-0.4.2+dfsg.1/src/gui/kbfirmware.cpp:204: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(!zip.open(QuaZip::mdUnzip))
data/ckb-next-0.4.2+dfsg.1/src/gui/kbfirmware.cpp:210:17:  [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(!binFile.open(QIODevice::ReadOnly))
data/ckb-next-0.4.2+dfsg.1/src/gui/kblight.cpp: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).
void KbLight::open(){
data/ckb-next-0.4.2+dfsg.1/src/gui/kblight.cpp:231: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 output[8];
data/ckb-next-0.4.2+dfsg.1/src/gui/kblight.h:62: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).
    void open();
data/ckb-next-0.4.2+dfsg.1/src/gui/kbmanager.cpp:65:19:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if(!connected.open(QIODevice::ReadOnly)){
data/ckb-next-0.4.2+dfsg.1/src/gui/kbmanager.cpp:82:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if(version.open(QIODevice::ReadOnly)){
data/ckb-next-0.4.2+dfsg.1/src/gui/kbperf.cpp:535: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 output[9];
data/ckb-next-0.4.2+dfsg.1/src/gui/kbperf.cpp:577: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.
            char name[4];
data/ckb-next-0.4.2+dfsg.1/src/gui/kbprofiledialog.cpp:278:24:  [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(tmpHashFile.open(QFile::ReadOnly)){
data/ckb-next-0.4.2+dfsg.1/src/gui/kbprofiledialog.cpp:283:33:  [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(tmpHashFileW.open(QFile::WriteOnly)){
data/ckb-next-0.4.2+dfsg.1/src/gui/kbprofiledialog.cpp:306:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if(iniFile.open(QFile::ReadOnly) && hashFile.open(QFile::ReadOnly)){
data/ckb-next-0.4.2+dfsg.1/src/gui/kbprofiledialog.cpp:306:50:  [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(iniFile.open(QFile::ReadOnly) && hashFile.open(QFile::ReadOnly)){
data/ckb-next-0.4.2+dfsg.1/src/gui/kbwidget.cpp:480: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(!file.open(QIODevice::ReadOnly)){
data/ckb-next-0.4.2+dfsg.1/src/gui/keyaction.cpp:511: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 buf[16];
data/ckb-next-0.4.2+dfsg.1/src/gui/macroreader.cpp:51:19:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if(!macroFile.open(QIODevice::ReadOnly)){
data/ckb-next-0.4.2+dfsg.1/src/gui/macroreader.cpp:55:26:  [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(macroFile.open(QIODevice::ReadOnly))
data/ckb-next-0.4.2+dfsg.1/src/gui/main.cpp:150:21:  [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(appShare.data(), newMem.constData(), newMem.length() + 1);
data/ckb-next-0.4.2+dfsg.1/src/gui/main.cpp:169: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).
    if(!f.open(QFile::ReadOnly | QFile::Text))
data/ckb-next-0.4.2+dfsg.1/src/gui/main.cpp:289: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).
    FILE *fp = fopen("/tmp/ckb", "w");
data/ckb-next-0.4.2+dfsg.1/src/libs/ckb-next/include/ckb-next/animation.h:132:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[CKB_KEYNAME_MAX];
data/ckb-next-0.4.2+dfsg.1/src/libs/ckb-next/include/ckb-next/animation.h:157:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[CKB_GRAD_MAX];
data/ckb-next-0.4.2+dfsg.1/src/libs/ckb-next/include/ckb-next/animation.h:159:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char a[CKB_GRAD_MAX];
data/ckb-next-0.4.2+dfsg.1/src/libs/ckb-next/include/ckb-next/animation.h:160:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char r[CKB_GRAD_MAX];
data/ckb-next-0.4.2+dfsg.1/src/libs/ckb-next/include/ckb-next/animation.h:161:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char g[CKB_GRAD_MAX];
data/ckb-next-0.4.2+dfsg.1/src/libs/ckb-next/include/ckb-next/animation.h:162:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char b[CKB_GRAD_MAX];
data/ckb-next-0.4.2+dfsg.1/src/libs/ckb-next/include/ckb-next/animation.h:185:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char out[strlen(src) * 3 + 1];
data/ckb-next-0.4.2+dfsg.1/src/libs/ckb-next/include/ckb-next/animation.h:245: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.
void ckb_getline(char word1[CKB_MAX_WORD], char word2[CKB_MAX_WORD], char word3[CKB_MAX_WORD]){
data/ckb-next-0.4.2+dfsg.1/src/libs/ckb-next/include/ckb-next/animation.h:245:44:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
void ckb_getline(char word1[CKB_MAX_WORD], char word2[CKB_MAX_WORD], char word3[CKB_MAX_WORD]){
data/ckb-next-0.4.2+dfsg.1/src/libs/ckb-next/include/ckb-next/animation.h:245:70:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
void ckb_getline(char word1[CKB_MAX_WORD], char word2[CKB_MAX_WORD], char word3[CKB_MAX_WORD]){
data/ckb-next-0.4.2+dfsg.1/src/libs/ckb-next/include/ckb-next/animation.h:246:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[CKB_MAX_WORD * 3 + 3];
data/ckb-next-0.4.2+dfsg.1/src/libs/ckb-next/include/ckb-next/animation.h:357:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[CKB_MAX_WORD], param[CKB_MAX_WORD], value[CKB_MAX_WORD];
data/ckb-next-0.4.2+dfsg.1/src/libs/ckb-next/include/ckb-next/animation.h:381: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.
            char cmd[CKB_MAX_WORD], param[CKB_MAX_WORD], value[CKB_MAX_WORD];
data/ckb-next-0.4.2+dfsg.1/src/libs/kissfft/kiss_fft.c:372:9:  [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(fout,tmpbuf,sizeof(kiss_fft_cpx)*st->nfft);
data/ckb-next-0.4.2+dfsg.1/src/animations/pipe/main.c:67:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    ssize_t ret = read(fd, input, MAX_INPUT);
data/ckb-next-0.4.2+dfsg.1/src/animations/pipe/main.c:84:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    size_t len = strlen(input);
data/ckb-next-0.4.2+dfsg.1/src/animations/pipe/main.c:105: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).
        while(pos < (long int)strlen(strptr)) {
data/ckb-next-0.4.2+dfsg.1/src/daemon/command.c:68: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).
    char* word = malloc(strlen(line) + 1);
data/ckb-next-0.4.2+dfsg.1/src/daemon/command.c:86: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).
                newline = line + strlen(line);
data/ckb-next-0.4.2+dfsg.1/src/daemon/devnode.c:83:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    char cpath[strlen(devpath) + 12];
data/ckb-next-0.4.2+dfsg.1/src/daemon/devnode.c:122: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).
    char outpath[strlen(devpath) + 10 * sizeof(char)];
data/ckb-next-0.4.2+dfsg.1/src/daemon/devnode.c:147: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).
    char outpath[strlen(devpath) + 10 * sizeof(char)];
data/ckb-next-0.4.2+dfsg.1/src/daemon/devnode.c:197: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 path[strlen(devpath) + 2];
data/ckb-next-0.4.2+dfsg.1/src/daemon/devnode.c:344: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 path[strlen(devpath) + 2];
data/ckb-next-0.4.2+dfsg.1/src/daemon/devnode.c:358: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).
    char fwpath[strlen(devpath) + 12];
data/ckb-next-0.4.2+dfsg.1/src/daemon/devnode.c:372:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    char ppath[strlen(devpath) + 11];
data/ckb-next-0.4.2+dfsg.1/src/daemon/devnode.c:415:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    ssize_t length = read(fd, buffer + leftoverlen, buffersize - leftoverlen);
data/ckb-next-0.4.2+dfsg.1/src/daemon/devnode.c:430:27:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        ssize_t length2 = read(fd, buffer + oldsize, buffersize - oldsize);
data/ckb-next-0.4.2+dfsg.1/src/daemon/dpi.c:25:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int left = strlen(stages);
data/ckb-next-0.4.2+dfsg.1/src/daemon/firmware.c:87:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    ssize_t length = read(fd, fwdata, FW_MAXSIZE + 1);
data/ckb-next-0.4.2+dfsg.1/src/daemon/input.c:385:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int left = strlen(keys), right = strlen(assignment);
data/ckb-next-0.4.2+dfsg.1/src/daemon/input.c:385: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).
    int left = strlen(keys), right = strlen(assignment);
data/ckb-next-0.4.2+dfsg.1/src/daemon/input_linux.c:195:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while (read(kb->uinput_kb - 1, &event, sizeof(event)) > 0) {
data/ckb-next-0.4.2+dfsg.1/src/daemon/input_mac_legacy.c:212:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(osx_version, osx_version_buf, 2);
data/ckb-next-0.4.2+dfsg.1/src/daemon/led.c:141:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(names[i], name, 11);
data/ckb-next-0.4.2+dfsg.1/src/daemon/main.c:176: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).
    char pidpath[strlen(devpath) + 6];
data/ckb-next-0.4.2+dfsg.1/src/daemon/main.c:212:19:  [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.
        } else if(sscanf(argument, "--hwload=%6s", hwload) == 1){
data/ckb-next-0.4.2+dfsg.1/src/daemon/main.c:246:5:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
    umask(0);
data/ckb-next-0.4.2+dfsg.1/src/daemon/profile.c:121: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).
    char decoded[strlen(name) + 1];
data/ckb-next-0.4.2+dfsg.1/src/daemon/profile.c:123:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    size_t srclen = strlen(decoded), dstlen = MD_NAME_LEN;
data/ckb-next-0.4.2+dfsg.1/src/daemon/profile.c:133: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).
    char decoded[strlen(name) + 1];
data/ckb-next-0.4.2+dfsg.1/src/daemon/profile.c:135:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    size_t srclen = strlen(decoded), dstlen = PR_NAME_LEN;
data/ckb-next-0.4.2+dfsg.1/src/daemon/profile.c:145: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).
    char* buffer2 = malloc(strlen(buffer) * 3 + 1);
data/ckb-next-0.4.2+dfsg.1/src/daemon/usb_linux.c:346: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).
        if(path[strlen(path) - 3] == '_'){
data/ckb-next-0.4.2+dfsg.1/src/daemon/usb_linux.c:354:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        char finalpath[strlen(path)+7];
data/ckb-next-0.4.2+dfsg.1/src/daemon/usb_linux.c:592:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(kb->name, name, KB_NAME_LEN);
data/ckb-next-0.4.2+dfsg.1/src/daemon/usb_linux.c:596:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(kb->serial, serial, SERIAL_LEN);
data/ckb-next-0.4.2+dfsg.1/src/daemon/usb_linux.c:683:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                strncpy(kbsyspath[index], syspath, FILENAME_MAX);
data/ckb-next-0.4.2+dfsg.1/src/daemon/usb_linux.c:896:37:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                int unused_result = read(sighandler_pipe[SIGHANDLER_RECEIVER], &sighandler_msg, sizeof(int));
data/ckb-next-0.4.2+dfsg.1/src/daemon/usb_mac.c:969:5:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    read(CFSocketGetNative(s), &type, sizeof(int));
data/ckb-next-0.4.2+dfsg.1/src/gui/animscript.cpp:453:16:  [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.
            if(sscanf(line, "argb %30s %x", keyName, &keyColor) != 2)
data/ckb-next-0.4.2+dfsg.1/src/gui/kb.cpp:33:27:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        features = ftpath.read(1000);
data/ckb-next-0.4.2+dfsg.1/src/gui/kb.cpp:55:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        usbModel = mpath.read(100);
data/ckb-next-0.4.2+dfsg.1/src/gui/kb.cpp:62:27:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        usbSerial = spath.read(100);
data/ckb-next-0.4.2+dfsg.1/src/gui/kb.cpp:69:27:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        firmware = fwpath.read(100);
data/ckb-next-0.4.2+dfsg.1/src/gui/kb.cpp:73:34:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            productID = prodpath.read(4).toUShort(0, 16);
data/ckb-next-0.4.2+dfsg.1/src/gui/kb.cpp:80:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        pollrate = ppath.read(100);
data/ckb-next-0.4.2+dfsg.1/src/gui/kb.cpp:88:33:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        hwlayout = hwlayoutPath.read(10);
data/ckb-next-0.4.2+dfsg.1/src/gui/kb.cpp:94:27:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        _maxDpi = dpiPath.read(6).trimmed().toUShort();
data/ckb-next-0.4.2+dfsg.1/src/gui/kb.cpp:488:14:  [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.
    QThread::usleep(100000);
data/ckb-next-0.4.2+dfsg.1/src/gui/kb.cpp:491:18:  [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.
        QThread::usleep(900000);
data/ckb-next-0.4.2+dfsg.1/src/gui/kbprofiledialog.cpp:308:59:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        QByteArray pkgHash = QByteArray::fromHex(hashFile.read(64).data());
data/ckb-next-0.4.2+dfsg.1/src/gui/keyaction.cpp:483: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(!display_string || strlen(display_string) == 0){
data/ckb-next-0.4.2+dfsg.1/src/gui/keyaction.cpp:487: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).
    size_t envstr_size = strlen(display_string) + 4;
data/ckb-next-0.4.2+dfsg.1/src/gui/keyaction.cpp:489:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(envstr, display_string, envstr_size);
data/ckb-next-0.4.2+dfsg.1/src/gui/keyaction.cpp:513:9:  [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(envstr, buf, envstr_size - 1 - strlen(envstr));
data/ckb-next-0.4.2+dfsg.1/src/gui/keyaction.cpp:513:48:  [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(envstr, buf, envstr_size - 1 - strlen(envstr));
data/ckb-next-0.4.2+dfsg.1/src/gui/macroreader.cpp:50:14:  [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.
    QThread::usleep(100000);
data/ckb-next-0.4.2+dfsg.1/src/gui/macroreader.cpp:53:18:  [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.
        QThread::usleep(900000);
data/ckb-next-0.4.2+dfsg.1/src/gui/mainwindow.cpp:585:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    int ret = read(signalHandlerFd[1], &sig, sizeof(sig));
data/ckb-next-0.4.2+dfsg.1/src/libs/ckb-next/include/ckb-next/animation.h:185: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 out[strlen(src) * 3 + 1];
data/ckb-next-0.4.2+dfsg.1/src/libs/ckb-next/include/ckb-next/animation.h:256: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).
    line[strlen(line) - 1] = 0;
data/ckb-next-0.4.2+dfsg.1/src/libs/ckb-next/include/ckb-next/animation.h:410:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                strncpy(key->name, param, CKB_KEYNAME_MAX);

ANALYSIS SUMMARY:

Hits = 307
Lines analyzed = 31367 in approximately 0.91 seconds (34651 lines/second)
Physical Source Lines of Code (SLOC) = 23764
Hits@level = [0] 170 [1]  59 [2] 215 [3]   5 [4]  26 [5]   2
Hits@level+ = [0+] 477 [1+] 307 [2+] 248 [3+]  33 [4+]  28 [5+]   2
Hits/KSLOC@level+ = [0+] 20.0724 [1+] 12.9187 [2+] 10.436 [3+] 1.38866 [4+] 1.17825 [5+] 0.0841609
Dot directories skipped = 2 (--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.