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/gkrellm-tz-0.8/config.c Examining data/gkrellm-tz-0.8/config.h Examining data/gkrellm-tz-0.8/features.h Examining data/gkrellm-tz-0.8/gkrellm-tz.c Examining data/gkrellm-tz-0.8/gkrellm-tz.h Examining data/gkrellm-tz-0.8/list.c Examining data/gkrellm-tz-0.8/list.h FINAL RESULTS: data/gkrellm-tz-0.8/list.c:342:14: [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. tz_old = getenv("TZ"); data/gkrellm-tz-0.8/gkrellm-tz.c:161: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 config[32]; data/gkrellm-tz-0.8/gkrellm-tz.c:162: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 value[CFG_BUFSIZE]; data/gkrellm-tz-0.8/list.c:77: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 = fopen(filename, mode); data/gkrellm-tz-0.8/list.c:87: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[LINE + 1]; data/gkrellm-tz-0.8/list.h:97: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 time_short[TZ_SHORT]; data/gkrellm-tz-0.8/list.h:99: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 time_long[TZ_LONG]; data/gkrellm-tz-0.8/config.c:506:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(entry[0]) == 0 || strlen(entry[1]) == 0) data/gkrellm-tz-0.8/config.c:506: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). if (strlen(entry[0]) == 0 || strlen(entry[1]) == 0) data/gkrellm-tz-0.8/config.c:533:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(entry[0]) == 0 || strlen(entry[1]) == 0) data/gkrellm-tz-0.8/config.c:533: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). if (strlen(entry[0]) == 0 || strlen(entry[1]) == 0) data/gkrellm-tz-0.8/gkrellm-tz.c:151: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(str); data/gkrellm-tz-0.8/gkrellm-tz.c:164:9: [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, "%31s %[^\n]", config, value) != 2) data/gkrellm-tz-0.8/list.c:98: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). len = strlen(line); data/gkrellm-tz-0.8/list.c:124: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). len = strlen(line); data/gkrellm-tz-0.8/list.c:181:41: [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(item->tz.time_short), data/gkrellm-tz-0.8/list.c:225: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). tt = g_locale_to_utf8(tmp, strlen(tmp), NULL, NULL, NULL); ANALYSIS SUMMARY: Hits = 17 Lines analyzed = 1525 in approximately 0.05 seconds (31361 lines/second) Physical Source Lines of Code (SLOC) = 1010 Hits@level = [0] 5 [1] 10 [2] 6 [3] 1 [4] 0 [5] 0 Hits@level+ = [0+] 22 [1+] 17 [2+] 7 [3+] 1 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 21.7822 [1+] 16.8317 [2+] 6.93069 [3+] 0.990099 [4+] 0 [5+] 0 Dot directories skipped = 1 (--followdotdir overrides) Minimum risk level = 1 Not every hit is necessarily a security vulnerability. There may be other security vulnerabilities; review your code! See 'Secure Programming HOWTO' (https://dwheeler.com/secure-programs) for more information.