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/xfce4-dict-0.8.4/src/popup_plugin.c Examining data/xfce4-dict-0.8.4/src/popup_plugin.h Examining data/xfce4-dict-0.8.4/src/xfce4-dict.c Examining data/xfce4-dict-0.8.4/panel-plugin/xfce4-dict-plugin.c Examining data/xfce4-dict-0.8.4/lib/resources.c Examining data/xfce4-dict-0.8.4/lib/gui.h Examining data/xfce4-dict-0.8.4/lib/dictd.c Examining data/xfce4-dict-0.8.4/lib/dictd.h Examining data/xfce4-dict-0.8.4/lib/common.h Examining data/xfce4-dict-0.8.4/lib/prefs.c Examining data/xfce4-dict-0.8.4/lib/common.c Examining data/xfce4-dict-0.8.4/lib/spell.h Examining data/xfce4-dict-0.8.4/lib/libdict.h Examining data/xfce4-dict-0.8.4/lib/speedreader.c Examining data/xfce4-dict-0.8.4/lib/dbus.c Examining data/xfce4-dict-0.8.4/lib/gui.c Examining data/xfce4-dict-0.8.4/lib/dbus.h Examining data/xfce4-dict-0.8.4/lib/spell.c Examining data/xfce4-dict-0.8.4/lib/prefs.h Examining data/xfce4-dict-0.8.4/lib/speedreader.h Examining data/xfce4-dict-0.8.4/lib/resources.h FINAL RESULTS: data/xfce4-dict-0.8.4/lib/dictd.c:69: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((gchar *)(&addr.sin_addr), host_p->h_addr, (size_t)host_p->h_length); data/xfce4-dict-0.8.4/lib/dictd.c:475:15: [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). defs_found = atoi(answer + 4); data/xfce4-dict-0.8.4/lib/spell.c:94:13: [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). count = atoi(tmp); data/xfce4-dict-0.8.4/lib/common.c:48: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). gint haystack_length = strlen(haystack); data/xfce4-dict-0.8.4/lib/common.c:49: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). gint needle_length = strlen(needle); data/xfce4-dict-0.8.4/lib/common.c:109: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). str = g_string_sized_new(strlen(haystack)); data/xfce4-dict-0.8.4/lib/common.c:115:43: [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_string_append(str, haystack + lt_pos + strlen(needle)); data/xfce4-dict-0.8.4/lib/dictd.c:94:13: [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). gint len = strlen (str); data/xfce4-dict-0.8.4/lib/dictd.c:334: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(lines[line_no]) > 1 && lines[line_no][1] == '.') data/xfce4-dict-0.8.4/lib/dictd.c:529:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while (read(fd, &c, 1) > 0) data/xfce4-dict-0.8.4/lib/resources.c:2058:31: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). __pragma(section(".CRT$XCU",read)) \ data/xfce4-dict-0.8.4/lib/resources.c:2066:31: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). __pragma(section(".CRT$XCU",read)) \ data/xfce4-dict-0.8.4/lib/resources.c:2078:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). section(".CRT$XCU",read) data/xfce4-dict-0.8.4/lib/resources.c:2085:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). section(".CRT$XCU",read) data/xfce4-dict-0.8.4/lib/spell.c:271: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). for (i = 0; i < strlen(result); i++) ANALYSIS SUMMARY: Hits = 15 Lines analyzed = 8779 in approximately 0.32 seconds (27171 lines/second) Physical Source Lines of Code (SLOC) = 6811 Hits@level = [0] 1 [1] 12 [2] 3 [3] 0 [4] 0 [5] 0 Hits@level+ = [0+] 16 [1+] 15 [2+] 3 [3+] 0 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 2.34914 [1+] 2.20232 [2+] 0.440464 [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.