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/apwal-0.4.5/src/about.c Examining data/apwal-0.4.5/src/about.h Examining data/apwal-0.4.5/src/app.c Examining data/apwal-0.4.5/src/app.h Examining data/apwal-0.4.5/src/apwalapp.c Examining data/apwal-0.4.5/src/apwalapp.h Examining data/apwal-0.4.5/src/apwalpref.c Examining data/apwal-0.4.5/src/apwalpref.h Examining data/apwal-0.4.5/src/cereimg.c Examining data/apwal-0.4.5/src/cereimg.h Examining data/apwal-0.4.5/src/common.h Examining data/apwal-0.4.5/src/editor.c Examining data/apwal-0.4.5/src/editor.h Examining data/apwal-0.4.5/src/filesel.c Examining data/apwal-0.4.5/src/filesel.h Examining data/apwal-0.4.5/src/gtkfnmatch.c Examining data/apwal-0.4.5/src/gtkfnmatch.h Examining data/apwal-0.4.5/src/gtkstuff.c Examining data/apwal-0.4.5/src/gtkstuff.h Examining data/apwal-0.4.5/src/iconlist.c Examining data/apwal-0.4.5/src/iconlist.h Examining data/apwal-0.4.5/src/iconpool.c Examining data/apwal-0.4.5/src/iconpool.h Examining data/apwal-0.4.5/src/iconsel.c Examining data/apwal-0.4.5/src/iconsel.h Examining data/apwal-0.4.5/src/iconsel_interface.c Examining data/apwal-0.4.5/src/iconsel_private.h Examining data/apwal-0.4.5/src/launcher.c Examining data/apwal-0.4.5/src/launcher.h Examining data/apwal-0.4.5/src/log.c Examining data/apwal-0.4.5/src/log.h Examining data/apwal-0.4.5/src/main.c Examining data/apwal-0.4.5/src/property.c Examining data/apwal-0.4.5/src/property.h Examining data/apwal-0.4.5/src/splash.c Examining data/apwal-0.4.5/src/splash.h Examining data/apwal-0.4.5/src/sysstuff.c Examining data/apwal-0.4.5/src/sysstuff.h Examining data/apwal-0.4.5/src/xmlrc.c Examining data/apwal-0.4.5/src/xmlrc.h Examining data/apwal-0.4.5/src/xstuff.c Examining data/apwal-0.4.5/src/xstuff.h FINAL RESULTS: data/apwal-0.4.5/src/iconlist.c:182:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(filename, dir->path); data/apwal-0.4.5/src/iconlist.c:184:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(filename, ico->name); data/apwal-0.4.5/src/iconlist.c:235:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(file, ico->dir->path); data/apwal-0.4.5/src/iconlist.c:237:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(file, ico->name); data/apwal-0.4.5/src/iconlist.c:510:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(dirname, dir->path); data/apwal-0.4.5/src/iconlist.c:512:5: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(dirname, namelist[n]->d_name); data/apwal-0.4.5/src/xmlrc.c:566:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(flast, xmlrc_resource_file()); data/apwal-0.4.5/src/xmlrc.c:591:5: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(g_xmlrc_filerc, config_file); data/apwal-0.4.5/src/xmlrc.c:599:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(g_xmlrc_filerc, home); data/apwal-0.4.5/src/xmlrc.c:596:12: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They 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. home = getenv("HOME"); data/apwal-0.4.5/src/iconlist.c:172:3: [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 filename[FILENAME_MAX]; data/apwal-0.4.5/src/iconlist.c:232:10: [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 file[FILENAME_MAX]; data/apwal-0.4.5/src/iconlist.c:491:3: [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 dirname[FILENAME_MAX]; data/apwal-0.4.5/src/iconsel_interface.c:125: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(res, "initial size: %d x %d", ico->width, ico->height); data/apwal-0.4.5/src/xmlrc.c:57: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 g_xmlrc_filerc[FILENAME_MAX] = { 0 }; data/apwal-0.4.5/src/xmlrc.c:477:3: [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[20]; data/apwal-0.4.5/src/xmlrc.c:478:3: [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 flast[FILENAME_MAX]; data/apwal-0.4.5/src/xmlrc.c:567:3: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(flast, ".last"); data/apwal-0.4.5/src/xmlrc.c:600:5: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(g_xmlrc_filerc, "/.apwalrc.xml"); data/apwal-0.4.5/src/iconlist.c:175: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). g_assert((strlen(dir->path) + strlen(name)) < FILENAME_MAX); data/apwal-0.4.5/src/iconlist.c:175:33: [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_assert((strlen(dir->path) + strlen(name)) < FILENAME_MAX); data/apwal-0.4.5/src/iconlist.c:183:3: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(filename, "/"); data/apwal-0.4.5/src/iconlist.c:236:3: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(file, "/"); data/apwal-0.4.5/src/iconlist.c:511:5: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(dirname, "/"); data/apwal-0.4.5/src/sysstuff.c:82:9: [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). len = strlen(*path); data/apwal-0.4.5/src/xmlrc.c:589:9: [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(config_file) >= FILENAME_MAX) data/apwal-0.4.5/src/xmlrc.c:590: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). ERR("config file name:%d to big", strlen(config_file)); data/apwal-0.4.5/src/xmlrc.c:626:9: [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). len = strlen(XMLRC_DEFAULT); ANALYSIS SUMMARY: Hits = 28 Lines analyzed = 9684 in approximately 0.27 seconds (35631 lines/second) Physical Source Lines of Code (SLOC) = 6875 Hits@level = [0] 15 [1] 9 [2] 9 [3] 1 [4] 9 [5] 0 Hits@level+ = [0+] 43 [1+] 28 [2+] 19 [3+] 10 [4+] 9 [5+] 0 Hits/KSLOC@level+ = [0+] 6.25455 [1+] 4.07273 [2+] 2.76364 [3+] 1.45455 [4+] 1.30909 [5+] 0 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.