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/geocode-glib-3.26.2/geocode-glib/geocode-backend.c Examining data/geocode-glib-3.26.2/geocode-glib/geocode-backend.h Examining data/geocode-glib-3.26.2/geocode-glib/geocode-bounding-box.c Examining data/geocode-glib-3.26.2/geocode-glib/geocode-bounding-box.h Examining data/geocode-glib-3.26.2/geocode-glib/geocode-error.c Examining data/geocode-glib-3.26.2/geocode-glib/geocode-error.h Examining data/geocode-glib-3.26.2/geocode-glib/geocode-forward.c Examining data/geocode-glib-3.26.2/geocode-glib/geocode-forward.h Examining data/geocode-glib-3.26.2/geocode-glib/geocode-glib-private.h Examining data/geocode-glib-3.26.2/geocode-glib/geocode-glib.c Examining data/geocode-glib-3.26.2/geocode-glib/geocode-glib.h Examining data/geocode-glib-3.26.2/geocode-glib/geocode-location.c Examining data/geocode-glib-3.26.2/geocode-glib/geocode-location.h Examining data/geocode-glib-3.26.2/geocode-glib/geocode-mock-backend.c Examining data/geocode-glib-3.26.2/geocode-glib/geocode-mock-backend.h Examining data/geocode-glib-3.26.2/geocode-glib/geocode-nominatim.c Examining data/geocode-glib-3.26.2/geocode-glib/geocode-nominatim.h Examining data/geocode-glib-3.26.2/geocode-glib/geocode-place.c Examining data/geocode-glib-3.26.2/geocode-glib/geocode-place.h Examining data/geocode-glib-3.26.2/geocode-glib/geocode-reverse.c Examining data/geocode-glib-3.26.2/geocode-glib/geocode-reverse.h Examining data/geocode-glib-3.26.2/geocode-glib/tests/geo-uri.c Examining data/geocode-glib-3.26.2/geocode-glib/tests/geocode-glib.c Examining data/geocode-glib-3.26.2/geocode-glib/tests/geocode-nominatim-test.c Examining data/geocode-glib-3.26.2/geocode-glib/tests/geocode-nominatim-test.h Examining data/geocode-glib-3.26.2/geocode-glib/tests/mock-backend.c FINAL RESULTS: data/geocode-glib-3.26.2/geocode-glib/tests/geocode-nominatim-test.c:217:55: [3] (buffer) g_get_tmp_dir: This function is synonymous with 'getenv("TMP")';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. g_assert (g_str_has_prefix (g_get_user_cache_dir (), g_get_tmp_dir ())); data/geocode-glib-3.26.2/geocode-glib/geocode-forward.c:441: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 top[G_ASCII_DTOSTR_BUF_SIZE]; data/geocode-glib-3.26.2/geocode-glib/geocode-forward.c:442: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 left[G_ASCII_DTOSTR_BUF_SIZE]; data/geocode-glib-3.26.2/geocode-glib/geocode-forward.c:443: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 bottom[G_ASCII_DTOSTR_BUF_SIZE]; data/geocode-glib-3.26.2/geocode-glib/geocode-forward.c:444: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 right[G_ASCII_DTOSTR_BUF_SIZE]; data/geocode-glib-3.26.2/geocode-glib/geocode-location.c:897: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 lat[G_ASCII_DTOSTR_BUF_SIZE]; data/geocode-glib-3.26.2/geocode-glib/geocode-location.c:898: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 lon[G_ASCII_DTOSTR_BUF_SIZE]; data/geocode-glib-3.26.2/geocode-glib/geocode-location.c:899: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 alt[G_ASCII_DTOSTR_BUF_SIZE]; data/geocode-glib-3.26.2/geocode-glib/geocode-location.c:900: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 acc[G_ASCII_DTOSTR_BUF_SIZE]; data/geocode-glib-3.26.2/geocode-glib/geocode-nominatim.c:397:45: [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). rank = place_rank ? atoi (place_rank) : 0; data/geocode-glib-3.26.2/geocode-glib/geocode-nominatim.c:610: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 *s_array[G_N_ELEMENTS (place_attributes)]; data/geocode-glib-3.26.2/geocode-glib/geocode-nominatim.c:813: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 lat_str[G_ASCII_DTOSTR_BUF_SIZE]; data/geocode-glib-3.26.2/geocode-glib/geocode-nominatim.c:814: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 lon_str[G_ASCII_DTOSTR_BUF_SIZE]; data/geocode-glib-3.26.2/geocode-glib/tests/geocode-glib.c:194: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 lat[G_ASCII_DTOSTR_BUF_SIZE]; data/geocode-glib-3.26.2/geocode-glib/tests/geocode-glib.c:195: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 lon[G_ASCII_DTOSTR_BUF_SIZE]; data/geocode-glib-3.26.2/geocode-glib/geocode-glib.c:98: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). g_checksum_update (sum, (const guchar *) uri, strlen (uri)); data/geocode-glib-3.26.2/geocode-glib/geocode-location.c:451:41: [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). uri_part = (const char *) uri + strlen("geo") + 1; data/geocode-glib-3.26.2/geocode-glib/geocode-mock-backend.c:216:11: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. gboolean equal; data/geocode-glib-3.26.2/geocode-glib/geocode-mock-backend.c:245:9: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. return equal; ANALYSIS SUMMARY: Hits = 19 Lines analyzed = 9690 in approximately 0.25 seconds (38563 lines/second) Physical Source Lines of Code (SLOC) = 5783 Hits@level = [0] 0 [1] 4 [2] 14 [3] 1 [4] 0 [5] 0 Hits@level+ = [0+] 19 [1+] 19 [2+] 15 [3+] 1 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 3.28549 [1+] 3.28549 [2+] 2.59381 [3+] 0.172921 [4+] 0 [5+] 0 Dot directories skipped = 2 (--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.