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/atomix-3.34.0/src/atomix-application.h Examining data/atomix-3.34.0/src/board-gtk.c Examining data/atomix-3.34.0/src/board-gtk.h Examining data/atomix-3.34.0/src/canvas_helper.c Examining data/atomix-3.34.0/src/canvas_helper.h Examining data/atomix-3.34.0/src/clock.c Examining data/atomix-3.34.0/src/clock.h Examining data/atomix-3.34.0/src/goal-view.c Examining data/atomix-3.34.0/src/goal-view.h Examining data/atomix-3.34.0/src/goal.c Examining data/atomix-3.34.0/src/goal.h Examining data/atomix-3.34.0/src/level-manager.c Examining data/atomix-3.34.0/src/level-manager.h Examining data/atomix-3.34.0/src/level-private.h Examining data/atomix-3.34.0/src/level.c Examining data/atomix-3.34.0/src/level.h Examining data/atomix-3.34.0/src/main.c Examining data/atomix-3.34.0/src/main.h Examining data/atomix-3.34.0/src/pf-test.c Examining data/atomix-3.34.0/src/playfield.c Examining data/atomix-3.34.0/src/playfield.h Examining data/atomix-3.34.0/src/preferences.c Examining data/atomix-3.34.0/src/preferences.h Examining data/atomix-3.34.0/src/theme-manager.c Examining data/atomix-3.34.0/src/theme-manager.h Examining data/atomix-3.34.0/src/theme-private.h Examining data/atomix-3.34.0/src/theme.c Examining data/atomix-3.34.0/src/theme.h Examining data/atomix-3.34.0/src/tile.c Examining data/atomix-3.34.0/src/tile.h Examining data/atomix-3.34.0/src/undo.c Examining data/atomix-3.34.0/src/undo.h Examining data/atomix-3.34.0/src/xml-util.c Examining data/atomix-3.34.0/src/xml-util.h FINAL RESULTS: data/atomix-3.34.0/src/level-manager.c:204:32: [3] (buffer) g_get_home_dir: This function is synonymous with 'getenv("HOME")';it returns untrustable input if the environment can beset by an attacker. It 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. dir_path = g_build_filename (g_get_home_dir (), ".atomix", "level", NULL); data/atomix-3.34.0/src/playfield.c:651:10: [3] (random) g_random_int_range: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. row = g_random_int_range (min_wall[0], max_wall[0]); data/atomix-3.34.0/src/playfield.c:652:10: [3] (random) g_random_int_range: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. col = g_random_int_range (min_wall[1], max_wall[1]); data/atomix-3.34.0/src/theme-manager.c:215:32: [3] (buffer) g_get_home_dir: This function is synonymous with 'getenv("HOME")';it returns untrustable input if the environment can beset by an attacker. It 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. dir_path = g_build_filename (g_get_home_dir (), ".atomix", "themes", NULL); data/atomix-3.34.0/src/level.c:208:20: [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). rows = (guint) atoi (prop_value); data/atomix-3.34.0/src/level.c:210:20: [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). cols = (guint) atoi (prop_value); data/atomix-3.34.0/src/playfield.c:191: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 (new_matrix, pf->priv->matrix, n_rows * n_cols * sizeof (Tile *)); data/atomix-3.34.0/src/playfield.c:212: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 (new_matrix, pf->priv->matrix, n_rows * n_cols * sizeof (Tile *)); data/atomix-3.34.0/src/playfield.c:255: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 (new_matrix, pf->priv->matrix, data/atomix-3.34.0/src/playfield.c:851:14: [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). number = atoi (current); data/atomix-3.34.0/src/playfield.c:855:14: [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). number = atoi (current); data/atomix-3.34.0/src/theme-manager.c:73:22: [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). alpha = CLAMP (atoi (prop_value), 0, 255); data/atomix-3.34.0/src/theme-manager.c:88:22: [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). priv->animstep = atoi (get_attribute_value ("dist", attribute_names, data/atomix-3.34.0/src/theme-manager.c:115:22: [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). alpha = CLAMP (atoi (prop_value), 0, 255); data/atomix-3.34.0/src/tile.c:293: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). prefix_len = strlen ("TILE_TYPE_"); ANALYSIS SUMMARY: Hits = 15 Lines analyzed = 6623 in approximately 0.16 seconds (40749 lines/second) Physical Source Lines of Code (SLOC) = 4579 Hits@level = [0] 4 [1] 1 [2] 10 [3] 4 [4] 0 [5] 0 Hits@level+ = [0+] 19 [1+] 15 [2+] 14 [3+] 4 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 4.14938 [1+] 3.27582 [2+] 3.05744 [3+] 0.873553 [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.