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/colord-1.4.5/client/cd-create-profile.c Examining data/colord-1.4.5/client/cd-fix-profile.c Examining data/colord-1.4.5/client/cd-iccdump.c Examining data/colord-1.4.5/client/cd-it8.c Examining data/colord-1.4.5/client/cd-util.c Examining data/colord-1.4.5/contrib/colord-sane/cd-main.c Examining data/colord-1.4.5/contrib/session-helper/cd-example.c Examining data/colord-1.4.5/contrib/session-helper/cd-main.c Examining data/colord-1.4.5/contrib/session-helper/cd-session.h Examining data/colord-1.4.5/contrib/session-helper/cd-state.c Examining data/colord-1.4.5/contrib/session-helper/cd-state.h Examining data/colord-1.4.5/examples/cd-dbus-create-device.c Examining data/colord-1.4.5/examples/cd-dbus-use-qualifier.c Examining data/colord-1.4.5/examples/cd-gtk-demo.c Examining data/colord-1.4.5/examples/cd-libcolord++.cpp Examining data/colord-1.4.5/examples/cd-libcolord-find-device-by-property.c Examining data/colord-1.4.5/examples/cd-libcolord-icc.c Examining data/colord-1.4.5/lib/colord/cd-buffer.c Examining data/colord-1.4.5/lib/colord/cd-buffer.h Examining data/colord-1.4.5/lib/colord/cd-client-sync.c Examining data/colord-1.4.5/lib/colord/cd-client-sync.h Examining data/colord-1.4.5/lib/colord/cd-client.c Examining data/colord-1.4.5/lib/colord/cd-client.h Examining data/colord-1.4.5/lib/colord/cd-color.c Examining data/colord-1.4.5/lib/colord/cd-color.h Examining data/colord-1.4.5/lib/colord/cd-context-lcms.c Examining data/colord-1.4.5/lib/colord/cd-context-lcms.h Examining data/colord-1.4.5/lib/colord/cd-device-sync.c Examining data/colord-1.4.5/lib/colord/cd-device-sync.h Examining data/colord-1.4.5/lib/colord/cd-device.c Examining data/colord-1.4.5/lib/colord/cd-device.h Examining data/colord-1.4.5/lib/colord/cd-dom.c Examining data/colord-1.4.5/lib/colord/cd-dom.h Examining data/colord-1.4.5/lib/colord/cd-edid.c Examining data/colord-1.4.5/lib/colord/cd-edid.h Examining data/colord-1.4.5/lib/colord/cd-enum.c Examining data/colord-1.4.5/lib/colord/cd-enum.h Examining data/colord-1.4.5/lib/colord/cd-icc-store.c Examining data/colord-1.4.5/lib/colord/cd-icc-store.h Examining data/colord-1.4.5/lib/colord/cd-icc-utils.c Examining data/colord-1.4.5/lib/colord/cd-icc-utils.h Examining data/colord-1.4.5/lib/colord/cd-icc.c Examining data/colord-1.4.5/lib/colord/cd-icc.h Examining data/colord-1.4.5/lib/colord/cd-interp-akima.c Examining data/colord-1.4.5/lib/colord/cd-interp-akima.h Examining data/colord-1.4.5/lib/colord/cd-interp-linear.c Examining data/colord-1.4.5/lib/colord/cd-interp-linear.h Examining data/colord-1.4.5/lib/colord/cd-interp.c Examining data/colord-1.4.5/lib/colord/cd-interp.h Examining data/colord-1.4.5/lib/colord/cd-it8-utils.c Examining data/colord-1.4.5/lib/colord/cd-it8-utils.h Examining data/colord-1.4.5/lib/colord/cd-it8.c Examining data/colord-1.4.5/lib/colord/cd-it8.h Examining data/colord-1.4.5/lib/colord/cd-math.c Examining data/colord-1.4.5/lib/colord/cd-math.h Examining data/colord-1.4.5/lib/colord/cd-profile-sync.c Examining data/colord-1.4.5/lib/colord/cd-profile-sync.h Examining data/colord-1.4.5/lib/colord/cd-profile.c Examining data/colord-1.4.5/lib/colord/cd-profile.h Examining data/colord-1.4.5/lib/colord/cd-quirk.c Examining data/colord-1.4.5/lib/colord/cd-quirk.h Examining data/colord-1.4.5/lib/colord/cd-sensor-sync.c Examining data/colord-1.4.5/lib/colord/cd-sensor-sync.h Examining data/colord-1.4.5/lib/colord/cd-sensor.c Examining data/colord-1.4.5/lib/colord/cd-sensor.h Examining data/colord-1.4.5/lib/colord/cd-spectrum.c Examining data/colord-1.4.5/lib/colord/cd-spectrum.h Examining data/colord-1.4.5/lib/colord/cd-test-daemon.c Examining data/colord-1.4.5/lib/colord/cd-test-shared.c Examining data/colord-1.4.5/lib/colord/cd-test-shared.h Examining data/colord-1.4.5/lib/colord/cd-transform.c Examining data/colord-1.4.5/lib/colord/cd-transform.h Examining data/colord-1.4.5/lib/colord/colord-private.h Examining data/colord-1.4.5/lib/colord/colord.h Examining data/colord-1.4.5/lib/colord/cd-test-private.c Examining data/colord-1.4.5/lib/colorhug/ch-common.c Examining data/colord-1.4.5/lib/colorhug/ch-common.h Examining data/colord-1.4.5/lib/colorhug/ch-device-queue.c Examining data/colord-1.4.5/lib/colorhug/ch-device-queue.h Examining data/colord-1.4.5/lib/colorhug/ch-device.c Examining data/colord-1.4.5/lib/colorhug/ch-device.h Examining data/colord-1.4.5/lib/colorhug/ch-hash.c Examining data/colord-1.4.5/lib/colorhug/ch-hash.h Examining data/colord-1.4.5/lib/colorhug/ch-inhx32.c Examining data/colord-1.4.5/lib/colorhug/ch-inhx32.h Examining data/colord-1.4.5/lib/colorhug/ch-math.c Examining data/colord-1.4.5/lib/colorhug/ch-math.h Examining data/colord-1.4.5/lib/colorhug/ch-self-test.c Examining data/colord-1.4.5/lib/colorhug/colorhug.h Examining data/colord-1.4.5/lib/compat/cd-compat-edid.c Examining data/colord-1.4.5/lib/compat/cd-compat-edid.h Examining data/colord-1.4.5/lib/compat/test.c Examining data/colord-1.4.5/src/cd-common.c Examining data/colord-1.4.5/src/cd-common.h Examining data/colord-1.4.5/src/cd-debug.c Examining data/colord-1.4.5/src/cd-debug.h Examining data/colord-1.4.5/src/cd-device-array.c Examining data/colord-1.4.5/src/cd-device-array.h Examining data/colord-1.4.5/src/cd-device-db.c Examining data/colord-1.4.5/src/cd-device-db.h Examining data/colord-1.4.5/src/cd-device.c Examining data/colord-1.4.5/src/cd-device.h Examining data/colord-1.4.5/src/cd-inhibit.c Examining data/colord-1.4.5/src/cd-inhibit.h Examining data/colord-1.4.5/src/cd-main.c Examining data/colord-1.4.5/src/cd-mapping-db.c Examining data/colord-1.4.5/src/cd-mapping-db.h Examining data/colord-1.4.5/src/cd-plugin.c Examining data/colord-1.4.5/src/cd-plugin.h Examining data/colord-1.4.5/src/cd-profile-array.c Examining data/colord-1.4.5/src/cd-profile-array.h Examining data/colord-1.4.5/src/cd-profile-db.c Examining data/colord-1.4.5/src/cd-profile-db.h Examining data/colord-1.4.5/src/cd-profile.c Examining data/colord-1.4.5/src/cd-profile.h Examining data/colord-1.4.5/src/cd-self-test.c Examining data/colord-1.4.5/src/cd-sensor-client.c Examining data/colord-1.4.5/src/cd-sensor-client.h Examining data/colord-1.4.5/src/cd-sensor.c Examining data/colord-1.4.5/src/cd-sensor.h Examining data/colord-1.4.5/src/plugins/cd-plugin-camera.c Examining data/colord-1.4.5/src/plugins/cd-plugin-example.c Examining data/colord-1.4.5/src/plugins/cd-plugin-sane.c Examining data/colord-1.4.5/src/plugins/cd-plugin-scanner.c Examining data/colord-1.4.5/src/sensors/argyll/cd-sensor-argyll.c Examining data/colord-1.4.5/src/sensors/argyll/cd-spawn.c Examining data/colord-1.4.5/src/sensors/argyll/cd-spawn.h Examining data/colord-1.4.5/src/sensors/colorhug/cd-sensor-colorhug.c Examining data/colord-1.4.5/src/sensors/dtp94/cd-sensor-dtp94.c Examining data/colord-1.4.5/src/sensors/dtp94/dtp94-device.c Examining data/colord-1.4.5/src/sensors/dtp94/dtp94-device.h Examining data/colord-1.4.5/src/sensors/dtp94/dtp94-enum.c Examining data/colord-1.4.5/src/sensors/dtp94/dtp94-enum.h Examining data/colord-1.4.5/src/sensors/dummy/cd-sensor-dummy.c Examining data/colord-1.4.5/src/sensors/huey/cd-sensor-huey.c Examining data/colord-1.4.5/src/sensors/huey/huey-ctx.c Examining data/colord-1.4.5/src/sensors/huey/huey-ctx.h Examining data/colord-1.4.5/src/sensors/huey/huey-device.c Examining data/colord-1.4.5/src/sensors/huey/huey-device.h Examining data/colord-1.4.5/src/sensors/huey/huey-enum.c Examining data/colord-1.4.5/src/sensors/huey/huey-enum.h Examining data/colord-1.4.5/src/sensors/huey2/huey-device.c Examining data/colord-1.4.5/src/sensors/huey2/huey-device.h Examining data/colord-1.4.5/src/sensors/huey2/huey-tool.c Examining data/colord-1.4.5/src/sensors/munki/cd-sensor-munki.c Examining data/colord-1.4.5/src/sensors/munki/munki-enum.c Examining data/colord-1.4.5/src/sensors/munki/munki-enum.h FINAL RESULTS: data/colord-1.4.5/lib/colord/cd-icc-store.c:593:27: [3] (buffer) g_get_home_dir: This function is synonymous with 'getenv("HOME")';it returns untrustable input if the environment can beset by an attacker. It can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. tmp = g_build_filename (g_get_home_dir (), ".color", "icc", NULL); data/colord-1.4.5/lib/colord/cd-test-daemon.c:65:8: [3] (random) g_random_int_range: 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. key = g_random_int_range (0x00, 0xffff); data/colord-1.4.5/lib/colord/cd-test-daemon.c:106:8: [3] (random) g_random_int_range: 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. key = g_random_int_range (0x00, 0xffff); data/colord-1.4.5/lib/colord/cd-test-daemon.c:390:8: [3] (random) g_random_int_range: 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. key = g_random_int_range (0x00, 0xffff); data/colord-1.4.5/lib/colord/cd-test-daemon.c:1208:8: [3] (random) g_random_int_range: 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. key = g_random_int_range (0x00, 0xffff); data/colord-1.4.5/lib/colord/cd-test-daemon.c:1833:8: [3] (random) g_random_int_range: 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. key = g_random_int_range (0x00, 0xffff); data/colord-1.4.5/lib/colord/cd-test-private.c:2012:5: [3] (random) g_random_int_range: 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. g_random_int_range ('a', 'z'), data/colord-1.4.5/lib/colord/cd-test-private.c:2013:5: [3] (random) g_random_int_range: 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. g_random_int_range ('a', 'z'), data/colord-1.4.5/lib/colord/cd-test-private.c:2014:5: [3] (random) g_random_int_range: 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. g_random_int_range ('a', 'z'), data/colord-1.4.5/lib/colord/cd-test-private.c:2015:5: [3] (random) g_random_int_range: 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. g_random_int_range ('a', 'z')); data/colord-1.4.5/lib/colord/cd-test-shared.c:59:9: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. tmp = realpath (path, full_tmp); data/colord-1.4.5/client/cd-create-profile.c:616:9: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). temp = atoi (cd_dom_get_node_data (tmp)); data/colord-1.4.5/client/cd-fix-profile.c:523:9: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). size = atoi (values[1]); data/colord-1.4.5/client/cd-it8.c:230:14: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). tmp->nm = atoi (split[0]); data/colord-1.4.5/client/cd-it8.c:396:14: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). tmp->nm = atoi (split[0]); data/colord-1.4.5/client/cd-util.c:1885:12: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). timeout = atoi (values[1]); data/colord-1.4.5/examples/cd-dbus-use-qualifier.c:129:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[256]; data/colord-1.4.5/lib/colord/cd-buffer.c:48:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (buffer, &tmp, sizeof(tmp)); data/colord-1.4.5/lib/colord/cd-buffer.c:64:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (buffer, &tmp, sizeof(tmp)); data/colord-1.4.5/lib/colord/cd-buffer.c:114:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (buffer, &tmp, sizeof(tmp)); data/colord-1.4.5/lib/colord/cd-buffer.c:130:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (buffer, &tmp, sizeof(tmp)); data/colord-1.4.5/lib/colord/cd-client.c:729:9: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open (filename, O_RDONLY); data/colord-1.4.5/lib/colord/cd-icc.c:156:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (str, &id, 4); data/colord-1.4.5/lib/colord/cd-icc.c:718:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (&id, tag, 4); data/colord-1.4.5/lib/colord/cd-math.c:99:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (dest, src, sizeof (CdVec3)); data/colord-1.4.5/lib/colord/cd-math.c:454:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (dest, src, sizeof (CdMat3x3)); data/colord-1.4.5/lib/colord/cd-test-shared.c:43:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char full_tmp[PATH_MAX]; data/colord-1.4.5/lib/colorhug/ch-device-queue.c:682:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (output_buffer, &tmp, sizeof (tmp)); data/colord-1.4.5/lib/colorhug/ch-device-queue.c:702:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (output_buffer, &tmp, sizeof (tmp)); data/colord-1.4.5/lib/colorhug/ch-device-queue.c:1046:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (buffer, &calibration_index, sizeof(guint16)); data/colord-1.4.5/lib/colorhug/ch-device-queue.c:1052:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (&buffer[i*4 + 2], &pf_tmp, sizeof (pf_tmp)); data/colord-1.4.5/lib/colorhug/ch-device-queue.c:1332:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (buffer, &calibration_index, sizeof(guint16)); data/colord-1.4.5/lib/colorhug/ch-device-queue.c:1364:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (&pf_tmp, output_buffer, sizeof (ChPackedFloat)); data/colord-1.4.5/lib/colorhug/ch-device-queue.c:1366:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (user_data, &tmp, sizeof (tmp)); data/colord-1.4.5/lib/colorhug/ch-device-queue.c:2239:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (&tmp, output_buffer + 0, sizeof (ChPackedFloat)); data/colord-1.4.5/lib/colorhug/ch-device-queue.c:2241:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (&tmp, output_buffer + 4, sizeof (ChPackedFloat)); data/colord-1.4.5/lib/colorhug/ch-device-queue.c:2243:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (&tmp, output_buffer + 8, sizeof (ChPackedFloat)); data/colord-1.4.5/lib/colorhug/ch-device-queue.c:2304:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (&tmp, output_buffer + 0, sizeof (ChPackedFloat)); data/colord-1.4.5/lib/colorhug/ch-device-queue.c:2306:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (&tmp, output_buffer + 4, sizeof (ChPackedFloat)); data/colord-1.4.5/lib/colorhug/ch-device-queue.c:2308:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (&tmp, output_buffer + 8, sizeof (ChPackedFloat)); data/colord-1.4.5/lib/colorhug/ch-device-queue.c:2415:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (buffer_tx + 0, &addr_le, 2); data/colord-1.4.5/lib/colorhug/ch-device-queue.c:2418:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (buffer_tx + 4, data, len); data/colord-1.4.5/lib/colorhug/ch-device-queue.c:2464:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (helper->data, output_buffer + 1, helper->len); data/colord-1.4.5/lib/colorhug/ch-device-queue.c:2496:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (buffer_tx + 0, &addr_le, 2); data/colord-1.4.5/lib/colorhug/ch-device-queue.c:2598:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (buffer_tx + 0, &addr_le, 2); data/colord-1.4.5/lib/colorhug/ch-device-queue.c:2647:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (buffer_tx + 0, &addr_le, 2); data/colord-1.4.5/lib/colorhug/ch-device-queue.c:2649:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (buffer_tx + 2, &len_le, 2); data/colord-1.4.5/lib/colorhug/ch-device-queue.c:3007:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (buffer_tx + 0, &addr_le, 2); data/colord-1.4.5/lib/colorhug/ch-device-queue.c:3009:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (buffer_tx + 3, data, len); data/colord-1.4.5/lib/colorhug/ch-device-queue.c:3076:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (buffer_tx + 0, &addr_le, 2); data/colord-1.4.5/lib/colorhug/ch-device.c:252:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (tdata->buffer, tdata->buffer_orig, CH_USB_HID_EP_SIZE); data/colord-1.4.5/lib/colorhug/ch-device.c:292:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (tdata->buffer_out, data/colord-1.4.5/lib/colorhug/ch-device.c:430:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (tdata->buffer_out, tdata->buffer + 3, 4); data/colord-1.4.5/lib/colorhug/ch-device.c:465:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (tdata->buffer_out, tdata->buffer + 3, 4); data/colord-1.4.5/lib/colorhug/ch-device.c:468:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (tdata->buffer_out, tdata->buffer + 1, 1); data/colord-1.4.5/lib/colorhug/ch-device.c:471:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (tdata->buffer_out, tdata->buffer + 4, 2); data/colord-1.4.5/lib/colorhug/ch-device.c:474:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (tdata->buffer_out, tdata->buffer + 2, 1); data/colord-1.4.5/lib/colorhug/ch-device.c:477:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (tdata->buffer_out, tdata->buffer + 3, 1); data/colord-1.4.5/lib/colorhug/ch-device.c:480:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (tdata->buffer_out, tdata->buffer + 2, 6); data/colord-1.4.5/lib/colorhug/ch-device.c:483:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (tdata->buffer_out, tdata->buffer + 1, 1); data/colord-1.4.5/lib/colorhug/ch-device.c:486:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (tdata->buffer_out, tdata->buffer + 8, 4); data/colord-1.4.5/lib/colorhug/ch-device.c:489:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (tdata->buffer + 1, tdata->buffer_orig + 1, 1); data/colord-1.4.5/lib/colorhug/ch-device.c:493:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (tdata->buffer + 4, tdata->buffer_orig + 1, 2); data/colord-1.4.5/lib/colorhug/ch-device.c:497:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (tdata->buffer + 2, tdata->buffer_orig + 1, 1); data/colord-1.4.5/lib/colorhug/ch-device.c:501:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (tdata->buffer + 3, tdata->buffer_orig + 1, 1); data/colord-1.4.5/lib/colorhug/ch-device.c:505:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (tdata->buffer + 13, tdata->buffer_orig + 1, 1); data/colord-1.4.5/lib/colorhug/ch-device.c:513:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (tdata->buffer + 8, tdata->buffer_orig + 1, 4); data/colord-1.4.5/lib/colorhug/ch-device.c:594:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (tdata->buffer + CH_BUFFER_INPUT_DATA, data/colord-1.4.5/lib/colorhug/ch-device.c:1128:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (value, buf, sizeof(buf)); data/colord-1.4.5/lib/colorhug/ch-device.c:1252:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (value, buf, sizeof(buf)); data/colord-1.4.5/lib/colorhug/ch-device.c:1358:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (value, buf, sizeof(buf)); data/colord-1.4.5/lib/colorhug/ch-device.c:1810:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (value, buf, sizeof(buf)); data/colord-1.4.5/lib/colorhug/ch-device.c:2386:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (&buf[j], &tmp, sizeof (guint16)); data/colord-1.4.5/lib/colorhug/ch-self-test.c:1247:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (firmware_data + 64, CH_FIRMWARE_ID_TOKEN1, 8); data/colord-1.4.5/lib/colorhug/ch-self-test.c:1252:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (firmware_data + 64, CH_FIRMWARE_ID_TOKEN2, 8); data/colord-1.4.5/src/sensors/huey2/huey-device.c:151:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (&request[1], &addr_be, 0x2); data/colord-1.4.5/src/sensors/huey2/huey-device.c:161:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (eeprom + i, reply + 0x4, 0x4); data/colord-1.4.5/src/sensors/huey2/huey-device.c:199:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (&request[1], &timeout_be, 0x2); data/colord-1.4.5/src/sensors/huey2/huey-device.c:207:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (&val_be, reply + 2, 4); data/colord-1.4.5/src/sensors/huey2/huey-device.c:217:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (&request[1], &timeout_be, 0x2); data/colord-1.4.5/src/sensors/huey2/huey-device.c:226:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (&val_be, reply + 2, 4); data/colord-1.4.5/client/cd-create-profile.c:206:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen (data_ti3), data/colord-1.4.5/client/cd-fix-profile.c:106:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen (item->name); data/colord-1.4.5/client/cd-fix-profile.c:121:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen (item->name); data/colord-1.4.5/client/cd-it8.c:119:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen (item->name) + 2; data/colord-1.4.5/client/cd-it8.c:123:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len += strlen (item->arguments) + 1; data/colord-1.4.5/client/cd-util.c:104:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen (title) + 1; data/colord-1.4.5/client/cd-util.c:714:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen (item->name) + 2; data/colord-1.4.5/client/cd-util.c:718:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len += strlen (item->arguments) + 1; data/colord-1.4.5/client/cd-util.c:1080:6: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). getchar (); data/colord-1.4.5/client/cd-util.c:1089:6: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). getchar (); data/colord-1.4.5/client/cd-util.c:1098:6: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). getchar (); data/colord-1.4.5/client/cd-util.c:1108:6: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). getchar (); data/colord-1.4.5/client/cd-util.c:1125:5: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). getchar (); data/colord-1.4.5/lib/colord/cd-icc.c:716:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen (tag) != 4) data/colord-1.4.5/lib/colord/cd-icc.c:1294:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen (split[0]) != 2) { data/colord-1.4.5/lib/colord/cd-icc.c:1329:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen (split[1]) != 2) { data/colord-1.4.5/lib/colord/cd-icc.c:2577:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen (language_code) != 2) { data/colord-1.4.5/lib/colord/cd-icc.c:2586:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen (country_code) != 2) { data/colord-1.4.5/lib/colord/cd-quirk.c:121:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). display_name->len - strlen (suffixes[i])); data/colord-1.4.5/lib/colord/cd-test-private.c:588:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). g_assert_cmpint (data_len, ==, strlen (data)); data/colord-1.4.5/lib/colorhug/ch-device-queue.c:954:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (helper->description, data/colord-1.4.5/lib/colorhug/ch-device-queue.c:1059:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy ((gchar *) buffer + 9*4 + 2 + 1, data/colord-1.4.5/lib/colorhug/ch-device-queue.c:2084:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(magic), data/colord-1.4.5/lib/colorhug/ch-device.c:1399:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen (CH_WRITE_EEPROM_MAGIC), data/colord-1.4.5/lib/colorhug/ch-hash.c:79:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen (value); data/colord-1.4.5/src/cd-device.c:761:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen (vendor); data/colord-1.4.5/src/cd-device.c:762: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). suffix_len = strlen (suffix); data/colord-1.4.5/src/cd-device.c:833:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen (property) > CD_DBUS_METADATA_KEY_LEN_MAX) { data/colord-1.4.5/src/cd-device.c:840:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (value != NULL && strlen (value) > CD_DBUS_METADATA_VALUE_LEN_MAX) { data/colord-1.4.5/src/cd-profile.c:495:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (value == NULL || strlen (value) < 3 || data/colord-1.4.5/src/cd-profile.c:520:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen (property) > CD_DBUS_METADATA_KEY_LEN_MAX) { data/colord-1.4.5/src/cd-profile.c:527:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (value != NULL && strlen (value) > CD_DBUS_METADATA_VALUE_LEN_MAX) { data/colord-1.4.5/src/cd-profile.c:807:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen (title); data/colord-1.4.5/src/sensors/dtp94/dtp94-device.c:132: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). command_len = strlen (command); ANALYSIS SUMMARY: Hits = 115 Lines analyzed = 72981 in approximately 1.57 seconds (46403 lines/second) Physical Source Lines of Code (SLOC) = 48956 Hits@level = [0] 34 [1] 34 [2] 70 [3] 11 [4] 0 [5] 0 Hits@level+ = [0+] 149 [1+] 115 [2+] 81 [3+] 11 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 3.04355 [1+] 2.34905 [2+] 1.65455 [3+] 0.224692 [4+] 0 [5+] 0 Symlinks skipped = 2 (--allowlink overrides but see doc for security issue) Dot directories skipped = 2 (--followdotdir overrides) Suppressed hits = 3 (use --neverignore to show them) 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.