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/eos-sdk-0~git20180727+ds/endless/endless.h Examining data/eos-sdk-0~git20180727+ds/endless/eosapiversion.h Examining data/eos-sdk-0~git20180727+ds/endless/eosapplication.c Examining data/eos-sdk-0~git20180727+ds/endless/eosapplication.h Examining data/eos-sdk-0~git20180727+ds/endless/eosattribution-private.h Examining data/eos-sdk-0~git20180727+ds/endless/eosattribution.c Examining data/eos-sdk-0~git20180727+ds/endless/eoscellrendererpixbuflink-private.h Examining data/eos-sdk-0~git20180727+ds/endless/eoscellrendererpixbuflink.c Examining data/eos-sdk-0~git20180727+ds/endless/eoscellrenderertextlink-private.h Examining data/eos-sdk-0~git20180727+ds/endless/eoscellrenderertextlink.c Examining data/eos-sdk-0~git20180727+ds/endless/eoscustomcontainer.c Examining data/eos-sdk-0~git20180727+ds/endless/eoscustomcontainer.h Examining data/eos-sdk-0~git20180727+ds/endless/eosenums.h Examining data/eos-sdk-0~git20180727+ds/endless/eosflexygrid-private.h Examining data/eos-sdk-0~git20180727+ds/endless/eosflexygrid.c Examining data/eos-sdk-0~git20180727+ds/endless/eosflexygrid.h Examining data/eos-sdk-0~git20180727+ds/endless/eosflexygridcell.c Examining data/eos-sdk-0~git20180727+ds/endless/eoshello.c Examining data/eos-sdk-0~git20180727+ds/endless/eosinit-private.h Examining data/eos-sdk-0~git20180727+ds/endless/eosinit.c Examining data/eos-sdk-0~git20180727+ds/endless/eoslicense.c Examining data/eos-sdk-0~git20180727+ds/endless/eoslicense.h Examining data/eos-sdk-0~git20180727+ds/endless/eosmacros.h Examining data/eos-sdk-0~git20180727+ds/endless/eospagemanager.c Examining data/eos-sdk-0~git20180727+ds/endless/eospagemanager.h Examining data/eos-sdk-0~git20180727+ds/endless/eosprofile-private.h Examining data/eos-sdk-0~git20180727+ds/endless/eosprofile.c Examining data/eos-sdk-0~git20180727+ds/endless/eosprofile.h Examining data/eos-sdk-0~git20180727+ds/endless/eostopbar-private.h Examining data/eos-sdk-0~git20180727+ds/endless/eostopbar.c Examining data/eos-sdk-0~git20180727+ds/endless/eostypes.h Examining data/eos-sdk-0~git20180727+ds/endless/eosutil.c Examining data/eos-sdk-0~git20180727+ds/endless/eoswindow.c Examining data/eos-sdk-0~git20180727+ds/endless/eoswindow.h Examining data/eos-sdk-0~git20180727+ds/endless/gvdb/gvdb-builder.c Examining data/eos-sdk-0~git20180727+ds/endless/gvdb/gvdb-builder.h Examining data/eos-sdk-0~git20180727+ds/endless/gvdb/gvdb-format.h Examining data/eos-sdk-0~git20180727+ds/endless/gvdb/gvdb-reader.c Examining data/eos-sdk-0~git20180727+ds/endless/gvdb/gvdb-reader.h Examining data/eos-sdk-0~git20180727+ds/test/endless/run-tests.c Examining data/eos-sdk-0~git20180727+ds/test/endless/run-tests.h Examining data/eos-sdk-0~git20180727+ds/test/endless/test-application.c Examining data/eos-sdk-0~git20180727+ds/test/endless/test-custom-container.c Examining data/eos-sdk-0~git20180727+ds/test/endless/test-flexy-grid.c Examining data/eos-sdk-0~git20180727+ds/test/endless/test-init.c Examining data/eos-sdk-0~git20180727+ds/test/endless/test-page-manager.c Examining data/eos-sdk-0~git20180727+ds/test/endless/test-profile.c Examining data/eos-sdk-0~git20180727+ds/test/endless/test-window.c Examining data/eos-sdk-0~git20180727+ds/tools/eos-profile-tool/eos-profile-cmd-convert.c Examining data/eos-sdk-0~git20180727+ds/tools/eos-profile-tool/eos-profile-cmd-diff.c Examining data/eos-sdk-0~git20180727+ds/tools/eos-profile-tool/eos-profile-cmd-help.c Examining data/eos-sdk-0~git20180727+ds/tools/eos-profile-tool/eos-profile-cmd-show.c Examining data/eos-sdk-0~git20180727+ds/tools/eos-profile-tool/eos-profile-cmds.h Examining data/eos-sdk-0~git20180727+ds/tools/eos-profile-tool/eos-profile-main.c Examining data/eos-sdk-0~git20180727+ds/tools/eos-profile-tool/eos-profile-utils.c Examining data/eos-sdk-0~git20180727+ds/tools/eos-profile-tool/eos-profile-utils.h FINAL RESULTS: data/eos-sdk-0~git20180727+ds/endless/eosprofile.c:283:21: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char *str = getenv ("EOS_PROFILE"); data/eos-sdk-0~git20180727+ds/endless/gvdb/gvdb-builder.c:297: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 (chunk->data, string, length); data/eos-sdk-0~git20180727+ds/endless/gvdb/gvdb-builder.c:334: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 (chunk (sizeof bloom_hdr), &bloom_hdr, sizeof bloom_hdr); data/eos-sdk-0~git20180727+ds/endless/gvdb/gvdb-builder.c:335: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 (chunk (sizeof table_hdr), &table_hdr, sizeof table_hdr); data/eos-sdk-0~git20180727+ds/endless/gvdb/gvdb-reader.c:280:47: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. hash_value = (hash_value * 33) + ((signed char *) key)[key_length]; data/eos-sdk-0~git20180727+ds/endless/gvdb/gvdb-reader.c:438:19: [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 (fullname, parent_name, parent_length); data/eos-sdk-0~git20180727+ds/endless/gvdb/gvdb-reader.c:439:19: [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 (fullname + parent_length, name, name_length); data/eos-sdk-0~git20180727+ds/tools/eos-profile-tool/eos-profile-cmd-diff.c:301:27: [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). g_auto(AutoFd) src_fd = open (src, O_RDONLY); data/eos-sdk-0~git20180727+ds/tools/eos-profile-tool/eos-profile-cmd-diff.c:306:28: [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). g_auto(AutoFd) dest_fd = open (dest, O_WRONLY | O_CREAT | O_TRUNC, 0600); data/eos-sdk-0~git20180727+ds/tools/eos-profile-tool/eos-profile-cmd-diff.c:314:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[8192]; data/eos-sdk-0~git20180727+ds/endless/eoshello.c:58:40: [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 (hello_string), data/eos-sdk-0~git20180727+ds/endless/eosprofile.c:291:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int capture_prefix_len = strlen ("capture"); data/eos-sdk-0~git20180727+ds/endless/eosprofile.c:469: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). int probe_len = strlen (probe->name); data/eos-sdk-0~git20180727+ds/endless/eosprofile.c:470: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). int msg_len = strlen (msg); data/eos-sdk-0~git20180727+ds/endless/eosprofile.c:482:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). max_columns - strlen (probe_name) - msg_len, ' ', data/eos-sdk-0~git20180727+ds/endless/eosprofile.c:529: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). gsize version_key_len = strlen (version_key); data/eos-sdk-0~git20180727+ds/endless/eosprofile.c:541: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). gsize appid_key_len = strlen (appid_key); data/eos-sdk-0~git20180727+ds/endless/eosprofile.c:549: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). gsize start_key_len = strlen (start_key); data/eos-sdk-0~git20180727+ds/endless/eosprofile.c:556: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). gsize profile_key_len = strlen (profile_key); data/eos-sdk-0~git20180727+ds/endless/eosprofile.c:591: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). gsize key_len = strlen (probe->name); data/eos-sdk-0~git20180727+ds/endless/gvdb/gvdb-builder.c:290:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). length = strlen (string); data/eos-sdk-0~git20180727+ds/endless/gvdb/gvdb-builder.c:392:36: [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). basename = item->key + strlen (item->parent->key); data/eos-sdk-0~git20180727+ds/endless/gvdb/gvdb-reader.c:436:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). parent_length = strlen (parent_name); data/eos-sdk-0~git20180727+ds/tools/eos-profile-tool/eos-profile-cmd-diff.c:316:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). res = read (src_fd, buf, 8192); data/eos-sdk-0~git20180727+ds/tools/eos-profile-tool/eos-profile-cmd-diff.c:477: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). write (output_fd, data, strlen (data)); data/eos-sdk-0~git20180727+ds/tools/eos-profile-tool/eos-profile-cmd-help.c:18: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). 14 - strlen (cmd->name), " ", ANALYSIS SUMMARY: Hits = 26 Lines analyzed = 11691 in approximately 2.35 seconds (4979 lines/second) Physical Source Lines of Code (SLOC) = 7737 Hits@level = [0] 0 [1] 16 [2] 9 [3] 1 [4] 0 [5] 0 Hits@level+ = [0+] 26 [1+] 26 [2+] 10 [3+] 1 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 3.36048 [1+] 3.36048 [2+] 1.29249 [3+] 0.129249 [4+] 0 [5+] 0 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.