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/hexchat-otr-0.2.2/src/hexchat-formats.c Examining data/hexchat-otr-0.2.2/src/otr-formats.h Examining data/hexchat-otr-0.2.2/src/otr_key.c Examining data/hexchat-otr-0.2.2/src/otr_ops.c Examining data/hexchat-otr-0.2.2/src/otr_util.c Examining data/hexchat-otr-0.2.2/src/hexchat_otr.c Examining data/hexchat-otr-0.2.2/src/otr.h Examining data/hexchat-otr-0.2.2/src/hexchat_otr.h FINAL RESULTS: data/hexchat-otr-0.2.2/src/hexchat_otr.c:22: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 set_policy[512] = IO_DEFAULT_POLICY; data/hexchat-otr-0.2.2/src/hexchat_otr.c:23: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 set_policy_known[512] = IO_DEFAULT_POLICY_KNOWN; data/hexchat-otr-0.2.2/src/hexchat_otr.c:24: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 set_ignore[512] = IO_DEFAULT_IGNORE; data/hexchat-otr-0.2.2/src/hexchat_otr.c:193: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 newmsg[512]; data/hexchat-otr-0.2.2/src/hexchat_otr.c:225: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 nick[256]; data/hexchat-otr-0.2.2/src/hexchat_otr.c:349: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 msg[LOGMAX], *s = msg; data/hexchat-otr-0.2.2/src/otr.h:157: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 better_msg_two[256]; /* what the second line of the "better" data/hexchat-otr-0.2.2/src/otr_ops.c:37: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 fullname[1024]; data/hexchat-otr-0.2.2/src/otr_ops.c:135: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 ownfp[45], peerfp[45]; data/hexchat-otr-0.2.2/src/otr_util.c:153: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 accname[256]; data/hexchat-otr-0.2.2/src/otr_util.c:198: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 fp[41]; data/hexchat-otr-0.2.2/src/otr_util.c:240: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 (fp + i * 2, "%02x", data/hexchat-otr-0.2.2/src/otr_util.c:262: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 accname[128]; data/hexchat-otr-0.2.2/src/otr_util.c:328: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 accname[128]; data/hexchat-otr-0.2.2/src/otr_util.c:428: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 accname[128]; data/hexchat-otr-0.2.2/src/otr_util.c:489: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 accname[128]; data/hexchat-otr-0.2.2/src/otr_util.c:528: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 accname[128]; data/hexchat-otr-0.2.2/src/otr_util.c:623: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 accname[256]; data/hexchat-otr-0.2.2/src/otr_key.c:99:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (-1 == read (g_io_channel_unix_get_fd (kg_st.ch[0]), &err, sizeof(err))) data/hexchat-otr-0.2.2/src/otr_util.c:589:5: [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 (secret)); data/hexchat-otr-0.2.2/src/otr_util.c:597:5: [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 (secret)); data/hexchat-otr-0.2.2/src/otr_util.c:605:4: [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 (secret)); data/hexchat-otr-0.2.2/src/otr_util.c:658: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). if ((strlen (msg) > OTR_MAX_MSG_SIZE) && (msg[strlen (msg) - 1] != '.') && (msg[strlen (msg) - 1] != ',')) data/hexchat-otr-0.2.2/src/otr_util.c:658:49: [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 (msg) > OTR_MAX_MSG_SIZE) && (msg[strlen (msg) - 1] != '.') && (msg[strlen (msg) - 1] != ',')) data/hexchat-otr-0.2.2/src/otr_util.c:658:83: [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 (msg) > OTR_MAX_MSG_SIZE) && (msg[strlen (msg) - 1] != '.') && (msg[strlen (msg) - 1] != ',')) data/hexchat-otr-0.2.2/src/otr_util.c:662: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). strlen (coi->msgqueue)); data/hexchat-otr-0.2.2/src/otr_util.c:671:37: [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). else if (strstr (msg, "?OTR:") && (strlen (msg) > OTR_MAX_MSG_SIZE) && (msg[strlen (msg) - 1] != '.') && (msg[strlen (msg) - 1] != ',')) data/hexchat-otr-0.2.2/src/otr_util.c:671:78: [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). else if (strstr (msg, "?OTR:") && (strlen (msg) > OTR_MAX_MSG_SIZE) && (msg[strlen (msg) - 1] != '.') && (msg[strlen (msg) - 1] != ',')) data/hexchat-otr-0.2.2/src/otr_util.c:671:112: [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). else if (strstr (msg, "?OTR:") && (strlen (msg) > OTR_MAX_MSG_SIZE) && (msg[strlen (msg) - 1] != '.') && (msg[strlen (msg) - 1] != ',')) data/hexchat-otr-0.2.2/src/otr_util.c:675: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). otr_debug (ircctx, from, TXT_RECEIVE_QUEUED, strlen (msg)); data/hexchat-otr-0.2.2/src/otr_util.c:706: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). TXT_RECEIVE_IGNORE, strlen (msg), accname, from, msg); ANALYSIS SUMMARY: Hits = 31 Lines analyzed = 2424 in approximately 0.08 seconds (32064 lines/second) Physical Source Lines of Code (SLOC) = 1779 Hits@level = [0] 0 [1] 13 [2] 18 [3] 0 [4] 0 [5] 0 Hits@level+ = [0+] 31 [1+] 31 [2+] 18 [3+] 0 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 17.4255 [1+] 17.4255 [2+] 10.118 [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.