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/tktray-1.3.9/tktray.c FINAL RESULTS: data/tktray-1.3.9/tktray.c:385: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 buf[256]; data/tktray-1.3.9/tktray.c:387:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf,"_NET_SYSTEM_TRAY_S%d",Tk_ScreenNumber(tkwin)); data/tktray-1.3.9/tktray.c:453:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char numeric[256]; data/tktray-1.3.9/tktray.c:454:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(numeric,"%ld",*(long*)retProp); data/tktray-1.3.9/tktray.c:927: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). int length = strlen(utf8msg); data/tktray-1.3.9/tktray.c:960:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ev.xclient.data.b,utf8msg,length<20?length:20); ANALYSIS SUMMARY: Hits = 6 Lines analyzed = 1267 in approximately 0.05 seconds (27294 lines/second) Physical Source Lines of Code (SLOC) = 1028 Hits@level = [0] 0 [1] 2 [2] 4 [3] 0 [4] 0 [5] 0 Hits@level+ = [0+] 6 [1+] 6 [2+] 4 [3+] 0 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 5.83658 [1+] 5.83658 [2+] 3.89105 [3+] 0 [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.