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/dopewars-1.5.12/src/configfile.c Examining data/dopewars-1.5.12/src/convert.c Examining data/dopewars-1.5.12/src/log.h Examining data/dopewars-1.5.12/src/message.h Examining data/dopewars-1.5.12/src/dopewars.h Examining data/dopewars-1.5.12/src/util.h Examining data/dopewars-1.5.12/src/error.c Examining data/dopewars-1.5.12/src/gtkport/clist.h Examining data/dopewars-1.5.12/src/gtkport/clist.c Examining data/dopewars-1.5.12/src/gtkport/unicodewrap.c Examining data/dopewars-1.5.12/src/gtkport/unicodewrap.h Examining data/dopewars-1.5.12/src/gtkport/gtkenums.h Examining data/dopewars-1.5.12/src/gtkport/gtkport.h Examining data/dopewars-1.5.12/src/gtkport/gtkport.c Examining data/dopewars-1.5.12/src/plugins/sound_esd.c Examining data/dopewars-1.5.12/src/plugins/sound_sdl.h Examining data/dopewars-1.5.12/src/plugins/sound_sdl.c Examining data/dopewars-1.5.12/src/plugins/sound_winmm.c Examining data/dopewars-1.5.12/src/plugins/sound_winmm.h Examining data/dopewars-1.5.12/src/plugins/sound_esd.h Examining data/dopewars-1.5.12/src/nls.h Examining data/dopewars-1.5.12/src/AIPlayer.c Examining data/dopewars-1.5.12/src/admin.c Examining data/dopewars-1.5.12/src/convert.h Examining data/dopewars-1.5.12/src/error.h Examining data/dopewars-1.5.12/src/tstring.c Examining data/dopewars-1.5.12/src/curses_client/curses_client.c Examining data/dopewars-1.5.12/src/curses_client/curses_client.h Examining data/dopewars-1.5.12/src/AIPlayer.h Examining data/dopewars-1.5.12/src/tstring.h Examining data/dopewars-1.5.12/src/cursesport/cursesport.c Examining data/dopewars-1.5.12/src/cursesport/cursesport.h Examining data/dopewars-1.5.12/src/gui_client/newgamedia.c Examining data/dopewars-1.5.12/src/gui_client/gtk_client.h Examining data/dopewars-1.5.12/src/gui_client/optdialog.h Examining data/dopewars-1.5.12/src/gui_client/optdialog.c Examining data/dopewars-1.5.12/src/gui_client/newgamedia.h Examining data/dopewars-1.5.12/src/gui_client/gtk_client.c Examining data/dopewars-1.5.12/src/sound.h Examining data/dopewars-1.5.12/src/network.h Examining data/dopewars-1.5.12/src/message.c Examining data/dopewars-1.5.12/src/log.c Examining data/dopewars-1.5.12/src/winmain.h Examining data/dopewars-1.5.12/src/winmain.c Examining data/dopewars-1.5.12/src/serverside.h Examining data/dopewars-1.5.12/src/admin.h Examining data/dopewars-1.5.12/src/network.c Examining data/dopewars-1.5.12/src/util.c Examining data/dopewars-1.5.12/src/configfile.h Examining data/dopewars-1.5.12/src/serverside.c Examining data/dopewars-1.5.12/src/dopewars.c Examining data/dopewars-1.5.12/src/sound.c Examining data/dopewars-1.5.12/win32/setup.c Examining data/dopewars-1.5.12/win32/contid.h Examining data/dopewars-1.5.12/win32/util.h Examining data/dopewars-1.5.12/win32/uninstall.c Examining data/dopewars-1.5.12/win32/makeinstall.c Examining data/dopewars-1.5.12/win32/guifunc.c Examining data/dopewars-1.5.12/win32/guifunc.h Examining data/dopewars-1.5.12/win32/util.c Examining data/dopewars-1.5.12/intl/libgettext.h Examining data/dopewars-1.5.12/intl/localcharset.c Examining data/dopewars-1.5.12/intl/dcgettext.c Examining data/dopewars-1.5.12/intl/plural.c Examining data/dopewars-1.5.12/intl/dngettext.c Examining data/dopewars-1.5.12/intl/gettext.h Examining data/dopewars-1.5.12/intl/dcigettext.c Examining data/dopewars-1.5.12/intl/l10nflist.c Examining data/dopewars-1.5.12/intl/loadinfo.h Examining data/dopewars-1.5.12/intl/gettextP.h Examining data/dopewars-1.5.12/intl/hash-string.h Examining data/dopewars-1.5.12/intl/intl-compat.c Examining data/dopewars-1.5.12/intl/dcngettext.c Examining data/dopewars-1.5.12/intl/gettext.c Examining data/dopewars-1.5.12/intl/finddomain.c Examining data/dopewars-1.5.12/intl/loadmsgcat.c Examining data/dopewars-1.5.12/intl/explodename.c Examining data/dopewars-1.5.12/intl/ngettext.c Examining data/dopewars-1.5.12/intl/textdomain.c Examining data/dopewars-1.5.12/intl/localealias.c Examining data/dopewars-1.5.12/intl/libgnuintl.h Examining data/dopewars-1.5.12/intl/bindtextdom.c Examining data/dopewars-1.5.12/intl/dgettext.c FINAL RESULTS: data/dopewars-1.5.12/src/serverside.c:809:5: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. chmod(PidFile, S_IREAD | S_IWRITE); data/dopewars-1.5.12/src/serverside.c:1151:3: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. chmod(sockname, S_IRUSR | S_IWUSR); data/dopewars-1.5.12/intl/localcharset.c:161:8: [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 (res_ptr + res_size - (l2 + 1) - (l1 + 1), buf1); data/dopewars-1.5.12/intl/localcharset.c:162:8: [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 (res_ptr + res_size - (l2 + 1), buf2); data/dopewars-1.5.12/intl/plural.c:1011:4: [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(msg, count == 0 ? ", expecting `" : " or `"); data/dopewars-1.5.12/intl/plural.c:1012:4: [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(msg, yytname[x]); data/dopewars-1.5.12/src/gtkport/gtkport.c:871:3: [4] (shell) ShellExecute: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. ShellExecute(parent->hWnd, "open", target, NULL, NULL, 0); data/dopewars-1.5.12/src/gtkport/gtkport.c:5693:9: [4] (shell) execv: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execv(bin, args); data/dopewars-1.5.12/src/network.c:514: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(&addpt[2], user); data/dopewars-1.5.12/src/network.c:516: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(&addpt[3 + strlen(user)], password); data/dopewars-1.5.12/src/network.c:546: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(&addpt[5], NetBuf->host); data/dopewars-1.5.12/src/network.c:1081: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(&addpt[8], username); data/dopewars-1.5.12/src/serverside.c:735:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fp, _(HelpText), VERSION); data/dopewars-1.5.12/win32/makeinstall.c:195:7: [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, sep + 4); data/dopewars-1.5.12/win32/util.c:88: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(newstr, str); data/dopewars-1.5.12/win32/util.c:138: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(str->text, text); data/dopewars-1.5.12/win32/util.c:150: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(str->text, text); data/dopewars-1.5.12/intl/dcigettext.c:133:7: [3] (buffer) getwd: This does not protect against buffer overflows by itself, so use with caution (CWE-120, CWE-20). Use getcwd instead. char *getwd (); data/dopewars-1.5.12/intl/dcigettext.c:134:28: [3] (buffer) getwd: This does not protect against buffer overflows by itself, so use with caution (CWE-120, CWE-20). Use getcwd instead. # define getcwd(buf, max) getwd (buf) data/dopewars-1.5.12/intl/dcigettext.c:1160:14: [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. language = getenv ("LANGUAGE"); data/dopewars-1.5.12/intl/dcigettext.c:1171: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. retval = getenv ("LC_ALL"); data/dopewars-1.5.12/intl/dcigettext.c:1175:16: [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. retval = getenv (categoryname); data/dopewars-1.5.12/intl/dcigettext.c:1179:13: [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. retval = getenv ("LANG"); data/dopewars-1.5.12/intl/loadmsgcat.c:266:21: [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. outcharset = getenv ("OUTPUT_CHARSET"); data/dopewars-1.5.12/intl/localcharset.c:229:16: [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. locale = getenv ("LC_ALL"); data/dopewars-1.5.12/intl/localcharset.c:232:13: [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. locale = getenv ("LC_CTYPE"); data/dopewars-1.5.12/intl/localcharset.c:234:15: [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. locale = getenv ("LANG"); data/dopewars-1.5.12/src/dopewars.c:2413:10: [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/dopewars-1.5.12/src/dopewars.c:2705:9: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. c = getopt_long(argc, argv, options, long_options, NULL); data/dopewars-1.5.12/src/dopewars.c:2707:9: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. c = getopt(argc, argv, options); data/dopewars-1.5.12/src/dopewars.c:2821:3: [3] (random) srand: 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. srand((unsigned)time(NULL)); data/dopewars-1.5.12/src/gtkport/gtkport.c:1175:10: [3] (misc) LoadLibrary: Ensure that the full path to the library is specified, or current directory may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to find library path, if you aren't already. hDll = LoadLibrary("COMCTL32.DLL"); data/dopewars-1.5.12/src/gtkport/gtkport.c:1206:12: [3] (misc) LoadLibrary: Ensure that the full path to the library is specified, or current directory may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to find library path, if you aren't already. module = LoadLibrary("UXTHEME.DLL"); data/dopewars-1.5.12/src/gtkport/gtkport.c:1241:3: [3] (misc) LoadLibrary: Ensure that the full path to the library is specified, or current directory may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to find library path, if you aren't already. LoadLibrary("RICHED20.DLL"); data/dopewars-1.5.12/src/util.c:51:5: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. int getopt(int argc, char *const argv[], const char *str) data/dopewars-1.5.12/src/util.h:58:5: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. int getopt(int argc, char *const argv[], const char *str); data/dopewars-1.5.12/src/winmain.c:167:13: [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. oldlang = getenv("LANG"); data/dopewars-1.5.12/intl/bindtextdom.c:158:4: [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 (result, dirname, len); data/dopewars-1.5.12/intl/bindtextdom.c:196:7: [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 (result, codeset, len); data/dopewars-1.5.12/intl/bindtextdom.c:232:7: [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_binding->domainname, domainname, len); data/dopewars-1.5.12/intl/bindtextdom.c:257:5: [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 (result, dirname, len); data/dopewars-1.5.12/intl/bindtextdom.c:288:8: [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 (result, codeset, len); data/dopewars-1.5.12/intl/dcigettext.c:231: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 msgid[ZERO]; data/dopewars-1.5.12/intl/dcigettext.c:344: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 data[ZERO]; data/dopewars-1.5.12/intl/dcigettext.c:447: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 (search->msgid, msgid1, msgid_len); data/dopewars-1.5.12/intl/dcigettext.c:637:9: [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 (newp->domainname, domainname, domainname_len + 1); data/dopewars-1.5.12/intl/dcigettext.c:1216:29: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. return (void *) ((char *) memcpy (dest, src, n) + n); data/dopewars-1.5.12/intl/finddomain.c:132:7: [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 (locale, alias_value, len); data/dopewars-1.5.12/intl/gettextP.h:161: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 domainname[ZERO]; data/dopewars-1.5.12/intl/l10nflist.c:218: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 (abs_filename, dirlist, dirlist_len); data/dopewars-1.5.12/intl/loadmsgcat.c:86:10: [2] (misc) open: 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). # define open __open data/dopewars-1.5.12/intl/loadmsgcat.c:253:4: [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 (charset, charsetstr, len); data/dopewars-1.5.12/intl/loadmsgcat.c:295:6: [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 (tmp, outcharset, len); data/dopewars-1.5.12/intl/loadmsgcat.c:296:6: [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 (tmp + len, "//TRANSLIT", 10 + 1); data/dopewars-1.5.12/intl/loadmsgcat.c:370:8: [2] (misc) open: 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). fd = open (domain_file->filename, O_RDONLY | O_BINARY); data/dopewars-1.5.12/intl/localcharset.c:103:6: [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 (file_name, dir, dir_len); data/dopewars-1.5.12/intl/localcharset.c:106:6: [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 (file_name + dir_len + add_slash, base, base_len + 1); data/dopewars-1.5.12/intl/localcharset.c:110:38: [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). if (file_name == NULL || (fp = fopen (file_name, "r")) == NULL) data/dopewars-1.5.12/intl/localcharset.c:117:4: [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 buf1[50+1]; data/dopewars-1.5.12/intl/localcharset.c:118:4: [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 buf2[50+1]; data/dopewars-1.5.12/intl/localcharset.c:247: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 buf[2 + 10 + 1]; data/dopewars-1.5.12/intl/localcharset.c:250:3: [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 (buf, "CP%u", GetACP ()); data/dopewars-1.5.12/intl/localealias.c:205: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 (full_fname, fname, fname_len); data/dopewars-1.5.12/intl/localealias.c:206: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 (&full_fname[fname_len], aliasfile, sizeof aliasfile); data/dopewars-1.5.12/intl/localealias.c:209:8: [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). fp = fopen (full_fname, "r"); data/dopewars-1.5.12/intl/localealias.c:222:7: [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[BUFSIZ]; data/dopewars-1.5.12/intl/localealias.c:235:4: [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 altbuf[BUFSIZ]; data/dopewars-1.5.12/intl/localealias.c:315:26: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. map[nmap].alias = memcpy (&string_space[string_space_act], data/dopewars-1.5.12/intl/localealias.c:319:26: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. map[nmap].value = memcpy (&string_space[string_space_act], data/dopewars-1.5.12/intl/plural.c:1002:8: [2] (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). Risk is low because the source is a constant string. strcpy(msg, "parse error"); data/dopewars-1.5.12/intl/textdomain.c:115:2: [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_domain, domainname, len); data/dopewars-1.5.12/src/AIPlayer.c:545: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 text[40]; data/dopewars-1.5.12/src/AIPlayer.c:563:3: [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(text, "%d", NewLocation); data/dopewars-1.5.12/src/AIPlayer.c:669: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 *RandomInsult[5] = { data/dopewars-1.5.12/src/configfile.c:243:8: [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). fp = fopen(cfgfile, "r+"); data/dopewars-1.5.12/src/configfile.c:245:10: [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). fp = fopen(cfgfile, "w+"); data/dopewars-1.5.12/src/curses_client/curses_client.c:353:10: [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). Port = atoi(text); data/dopewars-1.5.12/src/curses_client/curses_client.c:877: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). num = atoi(buf); data/dopewars-1.5.12/src/curses_client/curses_client.c:936:11: [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). c = atoi(input); data/dopewars-1.5.12/src/curses_client/curses_client.c:952:11: [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). c = atoi(input); data/dopewars-1.5.12/src/cursesport/cursesport.c:51:7: [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(&RealScreen[y][0], &VirtualScreen[y][0], data/dopewars-1.5.12/src/cursesport/cursesport.c:235: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 Buffer[10]; data/dopewars-1.5.12/src/dopewars.c:1124: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 thou[10]; data/dopewars-1.5.12/src/dopewars.c:1135:7: [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(thou, "%03d", (int)(absprice % 1000l)); data/dopewars-1.5.12/src/dopewars.c:1137:7: [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(thou, "%d", (int)(price % 1000l)); data/dopewars-1.5.12/src/dopewars.c:1866:8: [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). fp = fopen(FileName, "r"); data/dopewars-1.5.12/src/dopewars.c:2039:29: [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. return (char *)ValPt - (char *)Globals[GlobalIndex].StructStaticPt + data/dopewars-1.5.12/src/dopewars.c:2040: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. (char *)*(Globals[GlobalIndex].StructListPt) + data/dopewars-1.5.12/src/dopewars.c:2747:23: [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). cmdline->port = atoi(optarg); data/dopewars-1.5.12/src/gtkport/gtkport.c:1593:5: [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(&widget->requisition, requisition, sizeof(GtkRequisition)); data/dopewars-1.5.12/src/gtkport/gtkport.c:1613: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(&widget->allocation, allocation, sizeof(GtkAllocation)); data/dopewars-1.5.12/src/gtkport/gtkport.c:2131: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(retbuf, &editable->text->str[start_pos], copylen); data/dopewars-1.5.12/src/gtkport/gtkport.c:4582: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(&accel_group->accel[accel_group->numaccel - 1], newaccel, data/dopewars-1.5.12/src/gtkport/gtkport.c:4830: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(&paned->true_alloc, allocation, sizeof(GtkAllocation)); data/dopewars-1.5.12/src/gtkport/gtkport.c:4864: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(&paned->true_alloc, allocation, sizeof(GtkAllocation)); data/dopewars-1.5.12/src/gtkport/gtkport.c:5236: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(&allocation, &paned->true_alloc, sizeof(GtkAllocation)); data/dopewars-1.5.12/src/gtkport/gtkport.c:5426: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 file[800]; data/dopewars-1.5.12/src/gtkport/gtkport.c:5678: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 *args[3]; data/dopewars-1.5.12/src/gui_client/newgamedia.c:175:10: [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). Port = atoi(text); data/dopewars-1.5.12/src/gui_client/optdialog.c:109:16: [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). newset = atoi(text); data/dopewars-1.5.12/src/log.c:113: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). Log.fp = fopen(Log.File, "a"); data/dopewars-1.5.12/src/message.c:470:23: [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). NewServer->Port = atoi(msg); data/dopewars-1.5.12/src/message.c:475:31: [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). NewServer->CurPlayers = atoi(msg); data/dopewars-1.5.12/src/message.c:480:29: [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). NewServer->MaxPlayers = atoi(msg); data/dopewars-1.5.12/src/message.c:953:12: [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). return atoi(Word); data/dopewars-1.5.12/src/message.c:1046:12: [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). ID = atoi(buf); data/dopewars-1.5.12/src/network.c:547: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(&addpt[5 + hostlen], &netport, sizeof(netport)); data/dopewars-1.5.12/src/network.c:810: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(data, conn->Data, numbytes); data/dopewars-1.5.12/src/network.c:847: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(NewMessage, conn->Data, MessageLen); data/dopewars-1.5.12/src/network.c:966: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(addpt, data, addlen); data/dopewars-1.5.12/src/network.c:1079: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(&addpt[2], &netport, sizeof(netport)); data/dopewars-1.5.12/src/network.c:1080: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(&addpt[4], haddr, sizeof(struct in_addr)); data/dopewars-1.5.12/src/network.c:1327: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). *port = atoi(colon + 1); data/dopewars-1.5.12/src/network.c:1418:28: [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). conn->StatusCode = atoi(split[1]); data/dopewars-1.5.12/src/serverside.c:70:1: [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 *Discover[NUMDISCOVER] = { data/dopewars-1.5.12/src/serverside.c:506:9: [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). i = atoi(Data); data/dopewars-1.5.12/src/serverside.c:804:8: [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). fp = fopen(PidFile, "w"); data/dopewars-1.5.12/src/serverside.c:1690:5: [2] (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). Risk is low because the source is a constant string. strcpy(nid.szTip, "dopewars server - running"); data/dopewars-1.5.12/src/serverside.c:1885:25: [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). *ScoreVersion = atoi(header + SCOREHDRLEN); data/dopewars-1.5.12/src/serverside.c:1915:9: [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). old = fopen(convertfile, "r+"); data/dopewars-1.5.12/src/serverside.c:1923:22: [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 *backup = fopen(BackupFile, "w"); data/dopewars-1.5.12/src/serverside.c:1999:14: [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). fp = fopen(str->str, "r+"); data/dopewars-1.5.12/src/serverside.c:2001:16: [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). fp = fopen(str->str, "w+"); data/dopewars-1.5.12/src/serverside.c:2035:13: [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). ScoreFP = fopen(HiScoreFile, "r+"); data/dopewars-1.5.12/src/serverside.c:2037:15: [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). ScoreFP = fopen(HiScoreFile, "w+"); data/dopewars-1.5.12/src/serverside.c:2203:11: [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(&HiScore[j], &HiScore[j - 1], sizeof(struct HISCORE)); data/dopewars-1.5.12/src/serverside.c:2205:9: [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(&HiScore[i], &Score, sizeof(struct HISCORE)); data/dopewars-1.5.12/src/sound.c:182:19: [2] (misc) open: 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). if (driver->open) { data/dopewars-1.5.12/src/sound.c:184:17: [2] (misc) open: 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). driver->open(); data/dopewars-1.5.12/src/sound.h:34:14: [2] (misc) open: 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). gboolean (*open) (void); data/dopewars-1.5.12/src/tstring.c:163: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 Code[3], Type; data/dopewars-1.5.12/src/util.c:146:7: [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(&localread, readfds, sizeof(fd_set)); data/dopewars-1.5.12/src/util.c:148:7: [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(&localexcept, exceptfds, sizeof(fd_set)); data/dopewars-1.5.12/src/util.c:170:7: [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(readfds, &localread, sizeof(fd_set)); data/dopewars-1.5.12/src/util.c:172:7: [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(exceptfds, &localexcept, sizeof(fd_set)); data/dopewars-1.5.12/src/winmain.c:108:13: [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). LogFile = fopen("dopewars-log.txt", "w"); data/dopewars-1.5.12/src/winmain.c:165:3: [2] (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). Risk is low because the source is a constant string. strcpy(langenv, "LANG="); data/dopewars-1.5.12/src/winmain.c:180: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(langenv, "en"); data/dopewars-1.5.12/src/winmain.c:182:7: [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(langenv, "_GB"); data/dopewars-1.5.12/src/winmain.c:186: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(langenv, "fr"); data/dopewars-1.5.12/src/winmain.c:188:7: [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(langenv, "_CA"); data/dopewars-1.5.12/src/winmain.c:192: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(langenv, "de"); data/dopewars-1.5.12/src/winmain.c:195: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(langenv, "pl"); data/dopewars-1.5.12/src/winmain.c:198: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(langenv, "es"); data/dopewars-1.5.12/src/winmain.c:200:7: [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(langenv, "_ES"); data/dopewars-1.5.12/src/winmain.c:205:7: [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(langenv, "nn"); data/dopewars-1.5.12/src/winmain.c:207:7: [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(langenv, "no"); data/dopewars-1.5.12/src/winmain.c:211: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(langenv, "pt"); data/dopewars-1.5.12/src/winmain.c:213:7: [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(langenv, "_BR"); data/dopewars-1.5.12/win32/makeinstall.c:81: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 *titles[S_NONE] = { data/dopewars-1.5.12/win32/setup.c:209:3: [2] (buffer) TCHAR: 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. TCHAR path[MAX_PATH]; data/dopewars-1.5.12/win32/setup.c:349:22: [2] (integer) atol: 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). idata->totalsize = atol(pt); data/dopewars-1.5.12/win32/setup.c:369:18: [2] (integer) atol: 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). filesize = atol(pt); data/dopewars-1.5.12/win32/setup.c:379:18: [2] (integer) atol: 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). filesize = atol(pt); data/dopewars-1.5.12/win32/setup.c:424:18: [2] (integer) atol: 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). filesize = atol(pt); data/dopewars-1.5.12/win32/setup.c:591:7: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). MultiByteToWideChar(CP_ACP, 0, linkPath, -1, wsz, MAX_PATH); data/dopewars-1.5.12/win32/util.c:75:5: [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((char *)newpt, (char *)pt, numcp); data/dopewars-1.5.12/win32/util.c:175: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 tmpbuf[MAX_LENGTH_INT]; data/dopewars-1.5.12/win32/util.c:177:3: [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(tmpbuf, "%ld", val); data/dopewars-1.5.12/win32/util.c:411: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 str[3]; data/dopewars-1.5.12/win32/util.c:502: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 szDir[MAX_PATH]; data/dopewars-1.5.12/win32/util.c:702: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[3]; data/dopewars-1.5.12/win32/util.c:753:23: [2] (integer) atol: 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). newpt->filesize = atol(filesize); data/dopewars-1.5.12/intl/bindtextdom.c:155: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). size_t len = strlen (dirname) + 1; data/dopewars-1.5.12/intl/bindtextdom.c:193: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). size_t len = strlen (codeset) + 1; data/dopewars-1.5.12/intl/bindtextdom.c:225:20: [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). size_t len = strlen (domainname) + 1; data/dopewars-1.5.12/intl/bindtextdom.c:253: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). size_t len = strlen (dirname) + 1; data/dopewars-1.5.12/intl/bindtextdom.c:284:21: [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). size_t len = strlen (codeset) + 1; data/dopewars-1.5.12/intl/dcigettext.c:441:15: [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). msgid_len = strlen (msgid1) + 1; data/dopewars-1.5.12/intl/dcigettext.c:494:28: [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). size_t dirname_len = strlen (binding->dirname) + 1; data/dopewars-1.5.12/intl/dcigettext.c:534:20: [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). domainname_len = strlen (domainname); data/dopewars-1.5.12/intl/dcigettext.c:535:34: [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). xdomainname = (char *) alloca (strlen (categoryname) data/dopewars-1.5.12/intl/dcigettext.c:544:36: [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). single_locale = (char *) alloca (strlen (categoryvalue) + 1); data/dopewars-1.5.12/intl/dcigettext.c:700:24: [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). nls_uint32 len = strlen (msgid); data/dopewars-1.5.12/intl/dcigettext.c:1064:13: [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. case equal: data/dopewars-1.5.12/intl/finddomain.c:91:11: [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). strlen (dirname) + 1, 0, locale, NULL, NULL, data/dopewars-1.5.12/intl/finddomain.c:127:20: [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). size_t len = strlen (alias_value) + 1; data/dopewars-1.5.12/intl/finddomain.c:146:11: [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). strlen (dirname) + 1, mask, language, territory, data/dopewars-1.5.12/intl/gettextP.h:96:5: [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. equal, /* Comparision for equality. */ data/dopewars-1.5.12/intl/l10nflist.c:83: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). size_t part_len = strlen (argz); data/dopewars-1.5.12/intl/l10nflist.c:107: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). size_t part_len = strlen (argz); data/dopewars-1.5.12/intl/l10nflist.c:191: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). + strlen (language) data/dopewars-1.5.12/intl/l10nflist.c:193:12: [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). ? strlen (territory) + 1 : 0) data/dopewars-1.5.12/intl/l10nflist.c:195:12: [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). ? strlen (codeset) + 1 : 0) data/dopewars-1.5.12/intl/l10nflist.c:197:12: [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). ? strlen (normalized_codeset) + 1 : 0) data/dopewars-1.5.12/intl/l10nflist.c:200:12: [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). ? strlen (modifier) + 1 : 0) data/dopewars-1.5.12/intl/l10nflist.c:202:12: [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). ? strlen (special) + 1 : 0) data/dopewars-1.5.12/intl/l10nflist.c:206: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). ? strlen (sponsor) + 1 : 0) data/dopewars-1.5.12/intl/l10nflist.c:208:11: [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). ? strlen (revision) + 1 : 0)) : 0) data/dopewars-1.5.12/intl/l10nflist.c:209: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). + 1 + strlen (filename) + 1); data/dopewars-1.5.12/intl/l10nflist.c:332: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). = _nl_make_l10nflist (l10nfile_list, dir, strlen (dir) + 1, cnt, data/dopewars-1.5.12/intl/loadmsgcat.c:88:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). # define read __read data/dopewars-1.5.12/intl/loadmsgcat.c:246: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). charsetstr += strlen ("charset="); data/dopewars-1.5.12/intl/loadmsgcat.c:292:10: [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 (outcharset); data/dopewars-1.5.12/intl/loadmsgcat.c:418:29: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). long int nb = (long int) read (fd, read_ptr, to_read); data/dopewars-1.5.12/intl/localcharset.c:97:19: [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). size_t dir_len = strlen (dir); data/dopewars-1.5.12/intl/localcharset.c:98:20: [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). size_t base_len = strlen (base); data/dopewars-1.5.12/intl/localcharset.c:125:12: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc (fp); data/dopewars-1.5.12/intl/localcharset.c:134:11: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc (fp); data/dopewars-1.5.12/intl/localcharset.c:141:12: [1] (buffer) fscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. if (fscanf(fp, "%50s %50s", buf1, buf2) < 2) data/dopewars-1.5.12/intl/localcharset.c:143: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). l1 = strlen (buf1); data/dopewars-1.5.12/intl/localcharset.c:144: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). l2 = strlen (buf2); data/dopewars-1.5.12/intl/localcharset.c:262:19: [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). aliases += strlen (aliases) + 1, aliases += strlen (aliases) + 1) data/dopewars-1.5.12/intl/localcharset.c:262:52: [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). aliases += strlen (aliases) + 1, aliases += strlen (aliases) + 1) data/dopewars-1.5.12/intl/localcharset.c:266: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). codeset = aliases + strlen (aliases) + 1; data/dopewars-1.5.12/intl/localealias.c:287:20: [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). alias_len = strlen (alias) + 1; data/dopewars-1.5.12/intl/localealias.c:288:20: [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). value_len = strlen (value) + 1; data/dopewars-1.5.12/intl/plural.c:998:16: [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). size += strlen(yytname[x]) + 15, count++; data/dopewars-1.5.12/intl/plural.c:1013:4: [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(msg, "'"); data/dopewars-1.5.12/intl/plural.c:1219:15: [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. lval->op = equal; data/dopewars-1.5.12/intl/textdomain.c:112:20: [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). size_t len = strlen (domainname) + 1; data/dopewars-1.5.12/src/AIPlayer.c:431:19: [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(Text); i++) { data/dopewars-1.5.12/src/admin.c:61:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(addr.sun_path, sockname, sizeof(addr.sun_path)); data/dopewars-1.5.12/src/admin.c:114: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). if (strlen(inbuf) > 0) { data/dopewars-1.5.12/src/admin.c:115:21: [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 (inbuf[strlen(inbuf) - 1] == '\n') data/dopewars-1.5.12/src/admin.c:116:19: [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). inbuf[strlen(inbuf) - 1] = '\0'; data/dopewars-1.5.12/src/configfile.c:50:19: [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(str); i++) { data/dopewars-1.5.12/src/configfile.c:153: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(str); data/dopewars-1.5.12/src/configfile.c:160:30: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while (mpos < len && (ch = fgetc(fp)) != EOF) { data/dopewars-1.5.12/src/curses_client/curses_client.c:241: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(str); data/dopewars-1.5.12/src/curses_client/curses_client.c:254: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). int strwid = str ? strlen(str) : 0; data/dopewars-1.5.12/src/curses_client/curses_client.c:751:26: [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). maxlen = MAX(maxlen, strlen(listpt->data)); data/dopewars-1.5.12/src/curses_client/curses_client.c:935:30: [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). 2 + strlen(text), TRUE, NULL, '\0'); data/dopewars-1.5.12/src/curses_client/curses_client.c:951:30: [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). 2 + strlen(text), TRUE, NULL, '\0'); data/dopewars-1.5.12/src/curses_client/curses_client.c:1276:24: [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). mvaddstr(0, (Width - strlen(text)) / 2, text); data/dopewars-1.5.12/src/curses_client/curses_client.c:1292:14: [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 (!cp || strlen(cp) < 2) data/dopewars-1.5.12/src/curses_client/curses_client.c:1315:19: [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(text) && (text[i] == '^' || text[i] == '\n'); i++) data/dopewars-1.5.12/src/curses_client/curses_client.c:1321:19: [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(text); i++) { data/dopewars-1.5.12/src/curses_client/curses_client.c:1595:19: [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 (!allowed || strlen(allowed) == 0) data/dopewars-1.5.12/src/curses_client/curses_client.c:1600:35: [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 (AllowInd = 0; AllowInd < strlen(allowed); AllowInd++) { data/dopewars-1.5.12/src/curses_client/curses_client.c:1610: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). for (i = 2; i < strlen(trWord); i++) data/dopewars-1.5.12/src/curses_client/curses_client.c:1630:35: [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 (AllowInd = 0; AllowInd < strlen(allowed); AllowInd++) { data/dopewars-1.5.12/src/curses_client/curses_client.c:1857: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). lines = (strlen(data) + wid - 1) / wid; data/dopewars-1.5.12/src/curses_client/curses_client.c:1877:11: [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(data) > wid) { data/dopewars-1.5.12/src/curses_client/curses_client.c:2011: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). mvaddstr(0, Width - 2 - strlen(text->str), text->str); data/dopewars-1.5.12/src/curses_client/curses_client.c:2028:35: [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). mvaddstr(1, Width * 3 / 4 - strlen(text->str) / 2, text->str); data/dopewars-1.5.12/src/curses_client/curses_client.c:2053: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). mvaddstr(1, Width * 3 / 4 - strlen(text->str) / 2, text->str); data/dopewars-1.5.12/src/curses_client/curses_client.c:2206:10: [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). x += strlen(prompt); data/dopewars-1.5.12/src/curses_client/curses_client.c:2211:16: [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 = strlen(displaystr); i; i--) data/dopewars-1.5.12/src/curses_client/curses_client.c:2216: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). i = strlen(displaystr); data/dopewars-1.5.12/src/cursesport/cursesport.c:196:19: [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(str); i++) data/dopewars-1.5.12/src/dopewars.c:845: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(GetPlayerName(Play)) > 0 && !IsCop(Play)) data/dopewars-1.5.12/src/dopewars.c:1054:12: [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). buflen = strlen(buf); data/dopewars-1.5.12/src/dopewars.c:1181:7: [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(buf) >= 1) data/dopewars-1.5.12/src/dopewars.c:1193: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). if (!string || strlen(string) < 1) data/dopewars-1.5.12/src/dopewars.c:1211:9: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc(fp); data/dopewars-1.5.12/src/dopewars.c:2881:21: [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(str); i++) { data/dopewars-1.5.12/src/error.c:64:40: [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). utf8str = g_locale_to_utf8(untran, strlen(untran), NULL, NULL, NULL); data/dopewars-1.5.12/src/gtkport/clist.c:296:24: [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). hdi.cchTextMax = strlen(hdi.pszText); data/dopewars-1.5.12/src/gtkport/gtkport.c:3776:7: [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(apt) == 1) { data/dopewars-1.5.12/src/gtkport/gtkport.c:3861:14: [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). root_len = strlen(ifactory->path); data/dopewars-1.5.12/src/gtkport/gtkport.c:3862:16: [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 (!path || strlen(path) < root_len) data/dopewars-1.5.12/src/gtkport/gtkport.c:3867:7: [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(path) == root_len) data/dopewars-1.5.12/src/gtkport/gtkport.c:4636:55: [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). gtk_editable_insert_text(GTK_EDITABLE(entry), text, strlen(text), &pos); data/dopewars-1.5.12/src/gtkport/gtkport.c:4932:16: [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 (!name || strlen(name) != 13 || name[0] != '#') { data/dopewars-1.5.12/src/gtkport/gtkport.c:4935:12: [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 = strlen(name) - 1; i >= 1; --i) { data/dopewars-1.5.12/src/gtkport/gtkport.c:5112:21: [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(str); i++) { data/dopewars-1.5.12/src/gtkport/gtkport.c:5429:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(file, oldname, sizeof(file)); data/dopewars-1.5.12/src/gtkport/gtkport.c:5740:24: [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). pattern = g_strnfill(strlen(text), '_'); data/dopewars-1.5.12/src/gtkport/gtkport.c:5823:58: [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). gtk_editable_insert_text(GTK_EDITABLE(textview), text, strlen(text), data/dopewars-1.5.12/src/gtkport/unicodewrap.c:460:12: [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). return strlen(str); data/dopewars-1.5.12/src/gui_client/gtk_client.c:656:14: [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 (!cp || strlen(cp) < 3) data/dopewars-1.5.12/src/gui_client/gtk_client.c:724:10: [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). slen = strlen(spl2[1]); data/dopewars-1.5.12/src/gui_client/gtk_client.c:1201:7: [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(Message) > 0) { data/dopewars-1.5.12/src/gui_client/gtk_client.c:1933:19: [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(Responses); i++) { data/dopewars-1.5.12/src/gui_client/optdialog.c:731: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(Globals[i].Name) > 7 data/dopewars-1.5.12/src/message.c:303:26: [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). Play->Abil.RemoteNum = strlen(Data); data/dopewars-1.5.12/src/message.c:491: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(msg) >= 14 && strncmp(msg, "FATAL ERROR:", 12) == 0) { data/dopewars-1.5.12/src/message.c:534: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). int len = strlen(str); data/dopewars-1.5.12/src/message.c:552:19: [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(unenc); i++) { data/dopewars-1.5.12/src/message.c:778:15: [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 (curr && strlen(curr) >= 1) { data/dopewars-1.5.12/src/message.c:854:7: [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(Name) > 1) { data/dopewars-1.5.12/src/message.c:1060:7: [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(pt) >= 2) { data/dopewars-1.5.12/src/message.c:1223:16: [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 (Flags && strlen(Flags) >= 4) { data/dopewars-1.5.12/src/network.c:505:16: [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). addlen = 3 + strlen(user) + strlen(password); data/dopewars-1.5.12/src/network.c:505:31: [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). addlen = 3 + strlen(user) + strlen(password); data/dopewars-1.5.12/src/network.c:507:17: [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 (!addpt || strlen(user) > 255 || strlen(password) > 255) { data/dopewars-1.5.12/src/network.c:507:39: [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 (!addpt || strlen(user) > 255 || strlen(password) > 255) { data/dopewars-1.5.12/src/network.c:513:14: [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). addpt[1] = strlen(user); data/dopewars-1.5.12/src/network.c:515: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). addpt[2 + strlen(user)] = strlen(password); data/dopewars-1.5.12/src/network.c:515:29: [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). addpt[2 + strlen(user)] = strlen(password); data/dopewars-1.5.12/src/network.c:516:21: [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). strcpy(&addpt[3 + strlen(user)], password); data/dopewars-1.5.12/src/network.c:530: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). hostlen = strlen(NetBuf->host); data/dopewars-1.5.12/src/network.c:961:12: [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). addlen = strlen(data) + 1; data/dopewars-1.5.12/src/network.c:1065:16: [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). addlen = 9 + strlen(username); data/dopewars-1.5.12/src/network.c:1309:16: [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 (!uris || strlen(uris) < 7 || g_strncasecmp(uris, "http://", 7) != 0) data/dopewars-1.5.12/src/network.c:1360:52: [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_strncasecmp(split[1], "realm=", 6) == 0 && strlen(split[1]) > 6) { data/dopewars-1.5.12/src/network.c:1668:19: [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(unenc); i++) { data/dopewars-1.5.12/src/serverside.c:289:47: [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). "Content-Length: %d", (int)strlen(body->str)); data/dopewars-1.5.12/src/serverside.c:428:16: [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). } else if (strlen(GetPlayerName(Play)) == 0 && Data[0]) { data/dopewars-1.5.12/src/serverside.c:781:14: [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). msglen = strlen(msg); data/dopewars-1.5.12/src/serverside.c:1002: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). g_scanner_input_text(Scanner, string, strlen(string)); data/dopewars-1.5.12/src/serverside.c:1085:20: [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 (!WantQuit && strlen(GetPlayerName(Play)) > 0) { data/dopewars-1.5.12/src/serverside.c:1145:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(addr.sun_path, sockname, sizeof(addr.sun_path)); data/dopewars-1.5.12/src/serverside.c:1811:24: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). HiScore[i].Dead = (fgetc(fp) > 0); data/dopewars-1.5.12/src/serverside.c:1825:31: [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). fwrite(HiScore[i].Name, strlen(HiScore[i].Name) + 1, 1, fp); data/dopewars-1.5.12/src/serverside.c:1829:31: [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). fwrite(HiScore[i].Time, strlen(HiScore[i].Time) + 1, 1, fp); data/dopewars-1.5.12/src/serverside.c:1833: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). fwrite(text, strlen(text) + 1, 1, fp); data/dopewars-1.5.12/src/serverside.c:1882:19: [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 (header && strlen(header) > SCOREHDRLEN && data/dopewars-1.5.12/src/serverside.c:1899: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). fwrite(header, strlen(header) + 1, 1, fp); data/dopewars-1.5.12/src/serverside.c:1920:14: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). empty = (fgetc(old) == EOF); data/dopewars-1.5.12/src/serverside.c:1930:16: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ch = fgetc(old); data/dopewars-1.5.12/src/serverside.c:2052:9: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (fgetc(ScoreFP) == EOF) { data/dopewars-1.5.12/src/serverside.c:2176: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(text->str) > 0) data/dopewars-1.5.12/src/sound.c:86:14: [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(modname); data/dopewars-1.5.12/src/tstring.c:134: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). if ((type == 'T' || type == 't') && i + 2 < strlen(str)) { data/dopewars-1.5.12/src/tstring.c:174:14: [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). while (i < strlen(format)) { data/dopewars-1.5.12/src/tstring.c:215:14: [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). while (i < strlen(format)) { data/dopewars-1.5.12/src/util.c:61:21: [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 = 1; i < strlen(argv[apos]); i++) { data/dopewars-1.5.12/src/util.c:67:39: [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 (apos + 1 < argc && i == strlen(argv[apos]) - 1) { data/dopewars-1.5.12/src/winmain.c:74:57: [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). WriteConsole(GetStdHandle(STD_OUTPUT_HANDLE), string, strlen(string), data/dopewars-1.5.12/src/winmain.c:218:7: [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(langenv) > 5) { data/dopewars-1.5.12/win32/makeinstall.c:316:40: [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 (!WriteFile(fout, idata->product, strlen(idata->product) + 1, data/dopewars-1.5.12/win32/makeinstall.c:320: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). if (!WriteFile(fout, idata->installdir, strlen(idata->installdir) + 1, data/dopewars-1.5.12/win32/makeinstall.c:325:35: [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). (fout, idata->startmenudir, strlen(idata->startmenudir) + 1, data/dopewars-1.5.12/win32/setup.c:113:19: [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). strlen(service->description)); data/dopewars-1.5.12/win32/setup.c:350: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). pt += strlen(pt) + 1; data/dopewars-1.5.12/win32/setup.c:353: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). pt += strlen(pt) + 1; data/dopewars-1.5.12/win32/setup.c:360: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). pt += strlen(pt) + 1; data/dopewars-1.5.12/win32/setup.c:363: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). pt += strlen(pt) + 1; data/dopewars-1.5.12/win32/setup.c:367:11: [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). pt += strlen(pt) + 1; data/dopewars-1.5.12/win32/setup.c:370: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). pt += strlen(pt) + 1; data/dopewars-1.5.12/win32/setup.c:377:11: [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). pt += strlen(pt) + 1; data/dopewars-1.5.12/win32/setup.c:380: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). pt += strlen(pt) + 1; data/dopewars-1.5.12/win32/setup.c:387:11: [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). pt += strlen(pt) + 1; data/dopewars-1.5.12/win32/setup.c:390: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). pt += strlen(pt) + 1; data/dopewars-1.5.12/win32/setup.c:392: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). pt += strlen(pt) + 1; data/dopewars-1.5.12/win32/setup.c:399:11: [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). pt += strlen(pt) + 1; data/dopewars-1.5.12/win32/setup.c:402: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). pt += strlen(pt) + 1; data/dopewars-1.5.12/win32/setup.c:404: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). pt += strlen(pt) + 1; data/dopewars-1.5.12/win32/setup.c:410: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). pt += strlen(pt) + 1; data/dopewars-1.5.12/win32/setup.c:413:11: [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). pt += strlen(pt) + 1; data/dopewars-1.5.12/win32/setup.c:415:11: [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). pt += strlen(pt) + 1; data/dopewars-1.5.12/win32/setup.c:417:11: [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). pt += strlen(pt) + 1; data/dopewars-1.5.12/win32/setup.c:422:11: [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). pt += strlen(pt) + 1; data/dopewars-1.5.12/win32/setup.c:425: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). pt += strlen(pt) + 1; data/dopewars-1.5.12/win32/setup.c:517:37: [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). (logf, (*listpt)->filename, strlen((*listpt)->filename) + 1, data/dopewars-1.5.12/win32/setup.c:707:19: [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). strlen(idata->product)); data/dopewars-1.5.12/win32/setup.c:905: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). strlen(idata->startmenudir) + 1, data/dopewars-1.5.12/win32/setup.c:1115: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). sublencp = sublen = strlen(idata->product) + 30; data/dopewars-1.5.12/win32/uninstall.c:40: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). if (product && strlen(product + 1) > 0) data/dopewars-1.5.12/win32/util.c:87: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). newstr = bmalloc(strlen(str) + 1); data/dopewars-1.5.12/win32/util.c:137: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). bstr_setlength(str, strlen(text)); data/dopewars-1.5.12/win32/util.c:139:19: [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->length = strlen(text); data/dopewars-1.5.12/win32/util.c:149: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). bstr_expandby(str, strlen(text)); data/dopewars-1.5.12/win32/util.c:151: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). str->length += strlen(text); data/dopewars-1.5.12/win32/util.c:425:31: [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 (!WriteFile(fout, str, strlen(str) + 1, &bytes_written, NULL)) { data/dopewars-1.5.12/win32/util.c:429: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). if (!WriteFile(fout, service->name, strlen(service->name) + 1, data/dopewars-1.5.12/win32/util.c:433:44: [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 (!WriteFile(fout, service->display, strlen(service->display) + 1, data/dopewars-1.5.12/win32/util.c:438:38: [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). (fout, service->description, strlen(service->description) + 1, data/dopewars-1.5.12/win32/util.c:442:40: [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 (!WriteFile(fout, service->exe, strlen(service->exe) + 1, data/dopewars-1.5.12/win32/util.c:455:44: [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 (!WriteFile(fout, listpt->linkfile, strlen(listpt->linkfile) + 1, data/dopewars-1.5.12/win32/util.c:459:44: [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 (!WriteFile(fout, listpt->origfile, strlen(listpt->origfile) + 1, data/dopewars-1.5.12/win32/util.c:463:40: [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 (!WriteFile(fout, listpt->args, strlen(listpt->args) + 1, data/dopewars-1.5.12/win32/util.c:468:29: [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 (!WriteFile(fout, str, strlen(str) + 1, &bytes_written, NULL)) { data/dopewars-1.5.12/win32/util.c:481:44: [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 (!WriteFile(fout, listpt->filename, strlen(listpt->filename) + 1, data/dopewars-1.5.12/win32/util.c:559:7: [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(path) > 2 && path[0] == '\\' && path[1] == '\\') { data/dopewars-1.5.12/win32/util.c:564:14: [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). } else if (strlen(path) > 2 && path[1] == ':') { data/dopewars-1.5.12/win32/util.c:595:19: [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 (pt = &path[strlen(path) - 2]; pt > path; pt--) { ANALYSIS SUMMARY: Hits = 359 Lines analyzed = 40848 in approximately 1.12 seconds (36474 lines/second) Physical Source Lines of Code (SLOC) = 31568 Hits@level = [0] 73 [1] 196 [2] 126 [3] 20 [4] 15 [5] 2 Hits@level+ = [0+] 432 [1+] 359 [2+] 163 [3+] 37 [4+] 17 [5+] 2 Hits/KSLOC@level+ = [0+] 13.6847 [1+] 11.3723 [2+] 5.16346 [3+] 1.17207 [4+] 0.53852 [5+] 0.0633553 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.