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/sugar-datastore-0.117/src/carquinyol/metadatareader.c FINAL RESULTS: data/sugar-datastore-0.117/src/carquinyol/metadatareader.c:35:12: [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 (file_path, "r"); data/sugar-datastore-0.117/src/carquinyol/metadatareader.c:37:9: [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/sugar-datastore-0.117/src/carquinyol/metadatareader.c:72:13: [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/sugar-datastore-0.117/src/carquinyol/metadatareader.c:160:9: [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/sugar-datastore-0.117/src/carquinyol/metadatareader.c:22:22: [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). file_path_size = strlen (metadata_path) + 1 + strlen (property_name) + 1; data/sugar-datastore-0.117/src/carquinyol/metadatareader.c:22:51: [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). file_path_size = strlen (metadata_path) + 1 + strlen (property_name) + 1; ANALYSIS SUMMARY: Hits = 6 Lines analyzed = 238 in approximately 0.04 seconds (6657 lines/second) Physical Source Lines of Code (SLOC) = 191 Hits@level = [0] 5 [1] 2 [2] 4 [3] 0 [4] 0 [5] 0 Hits@level+ = [0+] 11 [1+] 6 [2+] 4 [3+] 0 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 57.5916 [1+] 31.4136 [2+] 20.9424 [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.