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/gputils-1.4.0/gplink/map.c Examining data/gputils-1.4.0/gplink/gplink.c Examining data/gputils-1.4.0/gplink/script.h Examining data/gputils-1.4.0/gplink/map.h Examining data/gputils-1.4.0/gplink/script.c Examining data/gputils-1.4.0/gplink/cod.c Examining data/gputils-1.4.0/gplink/lst.h Examining data/gputils-1.4.0/gplink/scan.h Examining data/gputils-1.4.0/gplink/lst.c Examining data/gputils-1.4.0/gplink/cod.h Examining data/gputils-1.4.0/header/header_check.c Examining data/gputils-1.4.0/libiberty/getopt.c Examining data/gputils-1.4.0/libiberty/getopt1.c Examining data/gputils-1.4.0/libiberty/strndup.c Examining data/gputils-1.4.0/libiberty/snprintf.c Examining data/gputils-1.4.0/libiberty/vsnprintf.c Examining data/gputils-1.4.0/libiberty/vasprintf.c Examining data/gputils-1.4.0/include/getopt.h Examining data/gputils-1.4.0/include/ansidecl.h Examining data/gputils-1.4.0/include/libiberty.h Examining data/gputils-1.4.0/include/stdhdr.h Examining data/gputils-1.4.0/libgputils/gpwriteobj.c Examining data/gputils-1.4.0/libgputils/gpcoffopt.h Examining data/gputils-1.4.0/libgputils/gpprocessor.h Examining data/gputils-1.4.0/libgputils/gpsymbol.h Examining data/gputils-1.4.0/libgputils/gpwritehex.c Examining data/gputils-1.4.0/libgputils/gpregister.h Examining data/gputils-1.4.0/libgputils/gpdis.h Examining data/gputils-1.4.0/libgputils/gphash.c Examining data/gputils-1.4.0/libgputils/gpsymbol.c Examining data/gputils-1.4.0/libgputils/gpdis.c Examining data/gputils-1.4.0/libgputils/gpcoffgen.h Examining data/gputils-1.4.0/libgputils/gpreadobj.h Examining data/gputils-1.4.0/libgputils/gpprocessor.c Examining data/gputils-1.4.0/libgputils/gpcofflink.c Examining data/gputils-1.4.0/libgputils/gpcofflink.h Examining data/gputils-1.4.0/libgputils/gpmessage.c Examining data/gputils-1.4.0/libgputils/libgputils.h Examining data/gputils-1.4.0/libgputils/gpcod.h Examining data/gputils-1.4.0/libgputils/gpsystem.h Examining data/gputils-1.4.0/libgputils/gpopcode.h Examining data/gputils-1.4.0/libgputils/gpwritehex.h Examining data/gputils-1.4.0/libgputils/gpsystem.c Examining data/gputils-1.4.0/libgputils/gphash.h Examining data/gputils-1.4.0/libgputils/gpcfg-table.c Examining data/gputils-1.4.0/libgputils/gpreadhex.h Examining data/gputils-1.4.0/libgputils/gpwriteobj.h Examining data/gputils-1.4.0/libgputils/gpreg-table.c Examining data/gputils-1.4.0/libgputils/gpcoff.h Examining data/gputils-1.4.0/libgputils/gpcoffgen.c Examining data/gputils-1.4.0/libgputils/gpreadobj.c Examining data/gputils-1.4.0/libgputils/gpcfg.c Examining data/gputils-1.4.0/libgputils/gpopcode.c Examining data/gputils-1.4.0/libgputils/gptypes.h Examining data/gputils-1.4.0/libgputils/gpreadhex.c Examining data/gputils-1.4.0/libgputils/gpcfg.h Examining data/gputils-1.4.0/libgputils/gpmessage.h Examining data/gputils-1.4.0/libgputils/gparchive.c Examining data/gputils-1.4.0/libgputils/gpregister.c Examining data/gputils-1.4.0/libgputils/gparchive.h Examining data/gputils-1.4.0/libgputils/gpmemory.c Examining data/gputils-1.4.0/libgputils/gpcoffopt.c Examining data/gputils-1.4.0/libgputils/gpmemory.h Examining data/gputils-1.4.0/libgputils/gpcod.c Examining data/gputils-1.4.0/gputils/block.h Examining data/gputils-1.4.0/gputils/block.c Examining data/gputils-1.4.0/gputils/gpstrip.c Examining data/gputils-1.4.0/gputils/gpdasm.c Examining data/gputils-1.4.0/gputils/labelset.h Examining data/gputils-1.4.0/gputils/dump.c Examining data/gputils-1.4.0/gputils/dump.h Examining data/gputils-1.4.0/gputils/gplib.c Examining data/gputils-1.4.0/gputils/gpvo.c Examining data/gputils-1.4.0/gputils/labelset.c Examining data/gputils-1.4.0/gputils/scan.h Examining data/gputils-1.4.0/gputils/gpvc.c Examining data/gputils-1.4.0/gpasm/evaluate.h Examining data/gputils-1.4.0/gpasm/gperror.c Examining data/gputils-1.4.0/gpasm/directive.c Examining data/gputils-1.4.0/gpasm/main.c Examining data/gputils-1.4.0/gpasm/gperror.h Examining data/gputils-1.4.0/gpasm/macro.h Examining data/gputils-1.4.0/gpasm/gpasm.c Examining data/gputils-1.4.0/gpasm/cod.c Examining data/gputils-1.4.0/gpasm/processor.c Examining data/gputils-1.4.0/gpasm/preprocess.h Examining data/gputils-1.4.0/gpasm/lst.h Examining data/gputils-1.4.0/gpasm/deps.h Examining data/gputils-1.4.0/gpasm/libgpasm.h Examining data/gputils-1.4.0/gpasm/deps.c Examining data/gputils-1.4.0/gpasm/macro.c Examining data/gputils-1.4.0/gpasm/coff.h Examining data/gputils-1.4.0/gpasm/preprocess.c Examining data/gputils-1.4.0/gpasm/scan.h Examining data/gputils-1.4.0/gpasm/special.c Examining data/gputils-1.4.0/gpasm/coff.c Examining data/gputils-1.4.0/gpasm/directive.h Examining data/gputils-1.4.0/gpasm/processor.h Examining data/gputils-1.4.0/gpasm/util.c Examining data/gputils-1.4.0/gpasm/evaluate.c Examining data/gputils-1.4.0/gpasm/lst.c Examining data/gputils-1.4.0/gpasm/cod.h Examining data/gputils-1.4.0/gpasm/special.h FINAL RESULTS: data/gputils-1.4.0/gpasm/gperror.c:149:5: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vprintf(message, ap0); data/gputils-1.4.0/gpasm/gperror.c:162:7: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(state.err.f, message, ap); data/gputils-1.4.0/gpasm/lst.c:132:7: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(state.lst.f, format, args); data/gputils-1.4.0/gpasm/lst.c:145:5: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(state.lst.f, format, args); data/gputils-1.4.0/gpasm/lst.c:162:9: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. r = vfprintf(state.lst.f, format, args); data/gputils-1.4.0/gpasm/preprocess.c:33:45: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define DBG_printf !DEBUG ? (void)0 : (void)printf data/gputils-1.4.0/gpasm/util.c:88:5: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(complaint, sizeof(complaint), data/gputils-1.4.0/gplink/lst.c:108:5: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(state.lst.f, format, args); data/gputils-1.4.0/gplink/map.c:46:7: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(state.map.f, format, args); data/gputils-1.4.0/gputils/gpvo.c:572:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(AUX_INDENT "command = \"%c\"\n", aux->_aux_symbol._aux_direct.command); data/gputils-1.4.0/gputils/gpvo.c:573:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(AUX_INDENT "string = \"%s\"\n", aux->_aux_symbol._aux_direct.string); data/gputils-1.4.0/gputils/gpvo.c:578:11: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(AUX_INDENT "file = %s\n", aux->_aux_symbol._aux_file.filename); data/gputils-1.4.0/gputils/gpvo.c:580:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(AUX_INDENT "line included = %li\n", aux->_aux_symbol._aux_file.line_number); data/gputils-1.4.0/gputils/gpvo.c:581:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(AUX_INDENT "flags = %x\n", aux->_aux_symbol._aux_file.flags); data/gputils-1.4.0/gputils/gpvo.c:585:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(AUX_INDENT "string = \"%s\"\n", aux->_aux_symbol._aux_ident.string); data/gputils-1.4.0/gputils/gpvo.c:589:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(AUX_INDENT "length = %li\n", aux->_aux_symbol._aux_scn.length); data/gputils-1.4.0/gputils/gpvo.c:590:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(AUX_INDENT "number of relocations = %i\n", aux->_aux_symbol._aux_scn.nreloc); data/gputils-1.4.0/gputils/gpvo.c:591:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(AUX_INDENT "number of line numbers = %i\n", aux->_aux_symbol._aux_scn.nlineno); data/gputils-1.4.0/gputils/gpvo.c:597:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(AUX_INDENT "callee = %s\n", data/gputils-1.4.0/gputils/gpvo.c:599:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(AUX_INDENT "is_interrupt = %lu\n", data/gputils-1.4.0/gputils/labelset.c:655:12: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. len += snprintf(&Text[len], MaxLen - len, fmt, section_names[i]); data/gputils-1.4.0/libgputils/gparchive.c:86:5: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(format, name, size, ctime(&time)); data/gputils-1.4.0/libgputils/gparchive.c:648:5: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(format, get_symbol_name(lst[i]), name); data/gputils-1.4.0/libgputils/gpmessage.c:54:3: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(buffer, sizeof (buffer), format, args); data/gputils-1.4.0/libgputils/gpmessage.c:77:3: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(buffer, sizeof (buffer), format, args); data/gputils-1.4.0/libgputils/gpmessage.c:100:3: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(buffer, sizeof (buffer), format, args); data/gputils-1.4.0/libgputils/gpmessage.c:121:3: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(buffer, sizeof (buffer), format, args); data/gputils-1.4.0/libgputils/gpsystem.c:309:7: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. l = vsnprintf(&Buffer[length], Buffer_length - length, Format, ap); data/gputils-1.4.0/libiberty/snprintf.c:52:5: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. int vsnprintf PARAMS ((char *, size_t, const char *, va_list)); data/gputils-1.4.0/libiberty/snprintf.c:55:1: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf VPARAMS ((char *s, size_t n, const char *format, ...)) data/gputils-1.4.0/libiberty/snprintf.c:62:12: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. result = vsnprintf (s, n, format, ap); data/gputils-1.4.0/libiberty/vasprintf.c:150:12: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. return vsprintf (*result, format, args); data/gputils-1.4.0/libiberty/vsnprintf.c:61:1: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf (s, n, format, ap) data/gputils-1.4.0/libiberty/vsnprintf.c:107:12: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. result = vsnprintf (s, n, format, ap); data/gputils-1.4.0/gpasm/gpasm.c:512:15: [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. while ((c = getopt_long(argc, argv, GET_OPTIONS, longopts, 0)) != EOF) { data/gputils-1.4.0/gpasm/gpasm.c:526:15: [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. while ((c = getopt_long(argc, argv, GET_OPTIONS, longopts, 0)) != EOF) { data/gputils-1.4.0/gplink/gplink.c:540:15: [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. while ((c = getopt_long(argc, argv, GET_OPTIONS, longopts, 0)) != EOF) { data/gputils-1.4.0/gplink/gplink.c:554:15: [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. while ((c = getopt_long(argc, argv, GET_OPTIONS, longopts, 0)) != EOF) { data/gputils-1.4.0/gplink/lst.c:78:9: [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. if (getenv("GPUTILS_WARN_MISSING_SRC")) { data/gputils-1.4.0/gputils/gpdasm.c:1246:21: [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. #define GETOPT_FUNC getopt_long(argc, argv, GET_OPTIONS, longopts, 0) data/gputils-1.4.0/gputils/gplib.c:121:21: [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. #define GETOPT_FUNC getopt_long(argc, argv, GET_OPTIONS, longopts, 0) data/gputils-1.4.0/gputils/gpstrip.c:239:21: [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. #define GETOPT_FUNC getopt_long(argc, argv, GET_OPTIONS, longopts, 0) data/gputils-1.4.0/gputils/gpvc.c:115:21: [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. #define GETOPT_FUNC getopt_long(argc, argv, GET_OPTIONS, longopts, 0) data/gputils-1.4.0/gputils/gpvo.c:728:21: [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. #define GETOPT_FUNC getopt_long(argc, argv, GET_OPTIONS, longopts, 0) data/gputils-1.4.0/include/getopt.h:112:12: [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. extern int getopt (int argc, char *const *argv, const char *shortopts); data/gputils-1.4.0/include/getopt.h:115:12: [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. extern int getopt (); data/gputils-1.4.0/include/getopt.h:118:12: [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. extern int getopt_long (int argc, char *const *argv, const char *shortopts, data/gputils-1.4.0/include/getopt.h:130:12: [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. extern int getopt (); data/gputils-1.4.0/include/getopt.h:131:12: [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. extern int getopt_long (); data/gputils-1.4.0/libgputils/gpsystem.c:49:20: [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. gp_header_path = getenv("GPUTILS_HEADER_PATH"); data/gputils-1.4.0/libgputils/gpsystem.c:50:17: [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. gp_lkr_path = getenv("GPUTILS_LKR_PATH"); data/gputils-1.4.0/libgputils/gpsystem.c:51:17: [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. gp_lib_path = getenv("GPUTILS_LIB_PATH"); data/gputils-1.4.0/libiberty/getopt.c:215:9: [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. #ifndef getenv data/gputils-1.4.0/libiberty/getopt.c:216: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. extern char *getenv (); data/gputils-1.4.0/libiberty/getopt.c:408: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. posixly_correct = getenv ("POSIXLY_CORRECT"); data/gputils-1.4.0/libiberty/getopt.c:973:1: [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. getopt (argc, argv, optstring) data/gputils-1.4.0/libiberty/getopt.c:1003:11: [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, "abc:d:0123456789"); data/gputils-1.4.0/libiberty/getopt1.c:69:1: [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. getopt_long (argc, argv, options, long_options, opt_index) data/gputils-1.4.0/libiberty/getopt1.c:125:11: [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, "abc:d:0123456789", data/gputils-1.4.0/gpasm/cod.c:88:19: [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). state.cod.f = fopen(state.codfilename, "wb"); data/gputils-1.4.0/gpasm/coff.c:148:5: [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 section_name[BUFSIZ]; data/gputils-1.4.0/gpasm/coff.c:363: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 message[BUFSIZ]; data/gputils-1.4.0/gpasm/coff.c:616: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[BUFSIZ]; data/gputils-1.4.0/gpasm/deps.c:30: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 output_file[BUFSIZ]; data/gputils-1.4.0/gpasm/deps.c:39:19: [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). state.dep.f = fopen(state.depfilename, "w"); data/gputils-1.4.0/gpasm/directive.c:361: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/gputils-1.4.0/gpasm/directive.c:854: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[BUFSIZ]; data/gputils-1.4.0/gpasm/directive.c:870: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[BUFSIZ]; data/gputils-1.4.0/gpasm/directive.c:959: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/gputils-1.4.0/gpasm/directive.c:1012:19: [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 unsigned char double_mask[64] = { 0, }; data/gputils-1.4.0/gpasm/directive.c:1020: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 v_buff[64]; data/gputils-1.4.0/gpasm/directive.c:1021: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[BUFSIZ]; data/gputils-1.4.0/gpasm/directive.c:1140: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[BUFSIZ]; data/gputils-1.4.0/gpasm/directive.c:1186: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 v_buff[64]; data/gputils-1.4.0/gpasm/directive.c:1187: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[BUFSIZ]; data/gputils-1.4.0/gpasm/directive.c:1302: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[BUFSIZ]; data/gputils-1.4.0/gpasm/directive.c:2305: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[BUFSIZ]; data/gputils-1.4.0/gpasm/directive.c:2462: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[BUFSIZ]; data/gputils-1.4.0/gpasm/directive.c:2593: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[BUFSIZ]; data/gputils-1.4.0/gpasm/directive.c:2910:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char message[BUFSIZ]; data/gputils-1.4.0/gpasm/directive.c:2932:15: [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 message[BUFSIZ]; data/gputils-1.4.0/gpasm/directive.c:3882: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 full_message[BUFSIZ]; data/gputils-1.4.0/gpasm/directive.c:3942:15: [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[64]; data/gputils-1.4.0/gpasm/directive.c:5376:11: [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 mesg[80]; data/gputils-1.4.0/gpasm/evaluate.c:92: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/gputils-1.4.0/gpasm/evaluate.c:485: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 buffer[BUFSIZ]; data/gputils-1.4.0/gpasm/gpasm.c:781: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). select_errorlevel(atoi(optarg)); data/gputils-1.4.0/gpasm/gperror.c:48:19: [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). state.err.f = fopen(state.errfilename, "wt"); data/gputils-1.4.0/gpasm/gperror.c:357: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/gputils-1.4.0/gpasm/gperror.c:462:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[BUFSIZ]; data/gputils-1.4.0/gpasm/gperror.c:555:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[BUFSIZ]; data/gputils-1.4.0/gpasm/lst.c:203:19: [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). state.lst.f = fopen(state.lstfilename, "wt"); data/gputils-1.4.0/gpasm/lst.c:430: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[5] = "????"; data/gputils-1.4.0/gpasm/lst.c:433:9: [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[2], "%02X", current_value & 0x00ff); data/gputils-1.4.0/gpasm/lst.c:986:30: [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 ((state.preproc.f = fopen(state.preproc.preprocfilename, "wt")) == NULL) { data/gputils-1.4.0/gpasm/preprocess.c:38: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(&(buf)[(start)], (repl_buf), repl_len); \ data/gputils-1.4.0/gpasm/preprocess.c:482: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 res_buf[11]; data/gputils-1.4.0/gpasm/preprocess.c:690: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(src_line->line, line, len); data/gputils-1.4.0/gpasm/processor.c:38: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[BUFSIZ]; data/gputils-1.4.0/gpasm/util.c:86:5: [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 complaint[80]; data/gputils-1.4.0/gpasm/util.c:210:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[3]; data/gputils-1.4.0/gplink/cod.c:127:19: [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). state.cod.f = fopen(state.codfilename, "wb"); data/gputils-1.4.0/gplink/gplink.c:324: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_name[PATH_MAX + 1]; data/gputils-1.4.0/gplink/gplink.c:328: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). coff = fopen(file_name, "rb"); data/gputils-1.4.0/gplink/gplink.c:335: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). coff = fopen(file_name, "rb"); data/gputils-1.4.0/gplink/gplink.c:543:30: [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). state.optimize.level = atoi(optarg); data/gputils-1.4.0/gplink/gplink.c:757:5: [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_name[BUFSIZ]; data/gputils-1.4.0/gplink/lst.c:38: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_name[PATH_MAX + 1]; data/gputils-1.4.0/gplink/lst.c:44: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). new->f = fopen(name, "rt"); data/gputils-1.4.0/gplink/lst.c:49: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). new->f = fopen(file_name, "rb"); data/gputils-1.4.0/gplink/lst.c:62:20: [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). new->f = fopen(file_name, "rb"); data/gputils-1.4.0/gplink/lst.c:147: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 dest[520], c; data/gputils-1.4.0/gplink/lst.c:169: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 linebuf[LINESIZ]; data/gputils-1.4.0/gplink/lst.c:170: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 dasmbuf[LINESIZ]; data/gputils-1.4.0/gplink/lst.c:307:19: [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). state.lst.f = fopen(state.lstfilename, "wt"); data/gputils-1.4.0/gplink/map.c:351:17: [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). state.map.f = fopen(state.mapfilename, "wt"); data/gputils-1.4.0/gplink/script.c:368:17: [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(shsym, begin, end - begin); data/gputils-1.4.0/gputils/dump.c:41: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(a, b, m); data/gputils-1.4.0/gputils/dump.c:96: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 temp_buf[256]; data/gputils-1.4.0/gputils/dump.c:336: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 b[16]; data/gputils-1.4.0/gputils/dump.c:378: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 b[256]; data/gputils-1.4.0/gputils/dump.c:431: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 b[FILE_SIZE]; data/gputils-1.4.0/gputils/dump.c:457:50: [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). source_files[number_of_source_files] = fopen(source_file_names[number_of_source_files], "rt"); data/gputils-1.4.0/gputils/dump.c:478: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 f[9]; data/gputils-1.4.0/gputils/dump.c:503: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[2048]; data/gputils-1.4.0/gputils/dump.c:544:15: [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[128]; data/gputils-1.4.0/gputils/dump.c:591: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 DebugType, DebugMessage[MAX_STRING_LEN]; data/gputils-1.4.0/gputils/gpdasm.c:157: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[BUFSIZ]; data/gputils-1.4.0/gputils/gpdasm.c:489: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[BUFSIZ]; data/gputils-1.4.0/gputils/gpdasm.c:574: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[PIC16E_IDLOCS_SIZE * 2]; data/gputils-1.4.0/gputils/gpdasm.c:698: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[BUFSIZ]; data/gputils-1.4.0/gputils/gpdasm.c:769: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[BUFSIZ]; data/gputils-1.4.0/gputils/gpdasm.c:873: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[BUFSIZ]; data/gputils-1.4.0/gputils/gpvc.c:30: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 filename[BUFFER_LENGTH]; data/gputils-1.4.0/gputils/gpvc.c:31: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. unsigned char temp[COD_BLOCK_SIZE]; data/gputils-1.4.0/gputils/gpvc.c:32: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 *source_file_names[MAX_SOURCE_FILES]; data/gputils-1.4.0/gputils/gpvc.c:36: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 *SymbolType4[154] = { data/gputils-1.4.0/gputils/gpvc.c:124: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 temp_buf[12]; data/gputils-1.4.0/gputils/gpvc.c:196: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). codefile = fopen(filename,"rb"); data/gputils-1.4.0/gputils/gpvo.c:145: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[32]; data/gputils-1.4.0/gputils/gpvo.c:190: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[BUFSIZ]; data/gputils-1.4.0/gputils/gpvo.c:529: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_type[8], buffer_derived_type[8], buffer_class[8]; data/gputils-1.4.0/gputils/gpvo.c:548:16: [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[64]; data/gputils-1.4.0/gputils/gpvo.c:635: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[BUFSIZ]; data/gputils-1.4.0/gputils/gpvo.c:735: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[BUFSIZ]; data/gputils-1.4.0/gputils/gpvo.c:817: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). state.export.f = fopen(state.export.filename, "w"); data/gputils-1.4.0/gputils/labelset.c:30:14: [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 const char *section_names[SECT_SPEC_MAX_NUM] = { "CODE", "DATA", "EEDATA" }; data/gputils-1.4.0/gputils/labelset.c:666: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[BUFSIZ]; data/gputils-1.4.0/header/header_check.c:34:7: [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). f = fopen(argv[1], "r"); data/gputils-1.4.0/include/libiberty.h:257:23: [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. extern const unsigned char _hex_value[_hex_array_size]; data/gputils-1.4.0/include/libiberty.h:313:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (char *) memcpy (libiberty_nptr, libiberty_optr, libiberty_len); })) data/gputils-1.4.0/include/libiberty.h:327:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (char *) memcpy (libiberty_nptr, libiberty_optr, libiberty_len)) data/gputils-1.4.0/libgputils/gparchive.c:51: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 name[256]; data/gputils-1.4.0/libgputils/gparchive.c:67: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 name[256]; data/gputils-1.4.0/libgputils/gparchive.c:96: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 name[256]; data/gputils-1.4.0/libgputils/gparchive.c:172:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[256]; data/gputils-1.4.0/libgputils/gparchive.c:173: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 date[12]; data/gputils-1.4.0/libgputils/gparchive.c:174: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 size[10]; data/gputils-1.4.0/libgputils/gparchive.c:237:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char filename[256]; data/gputils-1.4.0/libgputils/gparchive.c:250:17: [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). output_file = fopen(filename, "wb"); data/gputils-1.4.0/libgputils/gparchive.c:275:17: [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). output_file = fopen(archivename, "wb"); data/gputils-1.4.0/libgputils/gparchive.c:326: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[SARMAG + 1]; data/gputils-1.4.0/libgputils/gparchive.c:328: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). infile = fopen(filename, "rb"); data/gputils-1.4.0/libgputils/gparchive.c:425: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 name[256]; data/gputils-1.4.0/libgputils/gparchive.c:459: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 size[10]; data/gputils-1.4.0/libgputils/gparchive.c:532: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(ptr, symbol_name, symbol_len); data/gputils-1.4.0/libgputils/gparchive.c:621: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 name[256]; data/gputils-1.4.0/libgputils/gparchive.h:61: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 ar_name[256]; /* name of this member */ data/gputils-1.4.0/libgputils/gparchive.h:62: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 ar_date[12]; /* file mtime */ data/gputils-1.4.0/libgputils/gparchive.h:63: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 ar_size[10]; /* file size, printed as decimal */ data/gputils-1.4.0/libgputils/gparchive.h:64: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 ar_fmag[2]; /* should contain ARFMAG */ data/gputils-1.4.0/libgputils/gpcod.c:34: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(dest, src, dest[-1]); data/gputils-1.4.0/libgputils/gpcod.c:41: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 temp[TEMP_SIZE]; data/gputils-1.4.0/libgputils/gpcod.c:45:16: [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 const char mon_name[12][4] = { data/gputils-1.4.0/libgputils/gpcod.c:58: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(buffer, temp, sizeof_buffer); data/gputils-1.4.0/libgputils/gpcod.h:161:12: [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. unsigned char block[COD_BLOCK_SIZE]; data/gputils-1.4.0/libgputils/gpcod.h:173:12: [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. unsigned char dir[COD_BLOCK_SIZE]; data/gputils-1.4.0/libgputils/gpcoff.h:83:5: [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 name[8]; /* section name if less then 8 characters */ data/gputils-1.4.0/libgputils/gpcoff.h:231:5: [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 name[8]; /* symbol name if less then 8 characters */ data/gputils-1.4.0/libgputils/gpcoff.h:330: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 _unused[11]; data/gputils-1.4.0/libgputils/gpcoff.h:339: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 _unused[12]; data/gputils-1.4.0/libgputils/gpcoff.h:345: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 _unused[6]; data/gputils-1.4.0/libgputils/gpcoff.h:347: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 _unused2[4]; data/gputils-1.4.0/libgputils/gpcoff.h:350: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 _unused3[4]; data/gputils-1.4.0/libgputils/gpcoff.h:357: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 _unused[2]; data/gputils-1.4.0/libgputils/gpcoff.h:359: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 _unused2[12]; data/gputils-1.4.0/libgputils/gpcoff.h:371: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 _unused[2]; data/gputils-1.4.0/libgputils/gpcoff.h:381: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 _unused[4]; data/gputils-1.4.0/libgputils/gpcoff.h:387: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 _unused[4]; data/gputils-1.4.0/libgputils/gpcoff.h:390: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 _unused2[14]; data/gputils-1.4.0/libgputils/gpcoff.h:396: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 _unused[4]; data/gputils-1.4.0/libgputils/gpcoff.h:399: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 _unused2[6]; data/gputils-1.4.0/libgputils/gpcoff.h:401: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 _unused3[4]; data/gputils-1.4.0/libgputils/gpcoff.h:408: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 _unused[2]; data/gputils-1.4.0/libgputils/gpcoff.h:410: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 _unused2[12]; data/gputils-1.4.0/libgputils/gpcoff.h:414: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 _unused[6]; data/gputils-1.4.0/libgputils/gpcoff.h:416: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 _unused2[12]; data/gputils-1.4.0/libgputils/gpcoff.h:422: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 _unused[12]; data/gputils-1.4.0/libgputils/gpcoff.h:513:5: [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[SYMBOL_SIZE_v2]; data/gputils-1.4.0/libgputils/gpcofflink.c:527: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(name_i, name, len); data/gputils-1.4.0/libgputils/gpcofflink.c:528: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(name_i + len, "_i", 3); data/gputils-1.4.0/libgputils/gpcofflink.c:1383: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 fill_name[BUFSIZ]; data/gputils-1.4.0/libgputils/gpdis.c:1689: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 bytes[2]; data/gputils-1.4.0/libgputils/gpdis.c:1751:12: [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. unsigned char bytes[2]; data/gputils-1.4.0/libgputils/gpdis.c:2965:5: [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 dasmbuf[512]; data/gputils-1.4.0/libgputils/gpmemory.c:32:12: [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. unsigned char b[2]; data/gputils-1.4.0/libgputils/gpmessage.c:41: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[BUFSIZ]; data/gputils-1.4.0/libgputils/gpmessage.c:64: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[BUFSIZ]; data/gputils-1.4.0/libgputils/gpmessage.c:87: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[BUFSIZ]; data/gputils-1.4.0/libgputils/gpmessage.c:110: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[BUFSIZ]; data/gputils-1.4.0/libgputils/gpprocessor.c:1415: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[BUFSIZ]; data/gputils-1.4.0/libgputils/gpprocessor.c:1460: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[BUFSIZ]; data/gputils-1.4.0/libgputils/gpprocessor.c:1588: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[BUFSIZ]; data/gputils-1.4.0/libgputils/gpprocessor.c:1641: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[BUFSIZ]; data/gputils-1.4.0/libgputils/gpprocessor.c:1785: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[BUFSIZ]; data/gputils-1.4.0/libgputils/gpprocessor.c:1812: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[BUFSIZ]; data/gputils-1.4.0/libgputils/gpprocessor.c:1842: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[BUFSIZ]; data/gputils-1.4.0/libgputils/gpprocessor.c:1930: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[BUFSIZ]; data/gputils-1.4.0/libgputils/gpprocessor.c:1953: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[BUFSIZ]; data/gputils-1.4.0/libgputils/gpprocessor.c:2001: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[BUFSIZ]; data/gputils-1.4.0/libgputils/gpprocessor.h:275:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *names[MAX_NAMES]; data/gputils-1.4.0/libgputils/gpreadhex.c:27:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char linebuf[LINESIZ]; data/gputils-1.4.0/libgputils/gpreadhex.c:93:17: [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 ((infile = fopen(filename, "rt")) == NULL) { data/gputils-1.4.0/libgputils/gpreadobj.c:61: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 magic[SARMAG + 1]; data/gputils-1.4.0/libgputils/gpreadobj.c:64: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). if ((file = fopen(filename, "rb")) == NULL) { data/gputils-1.4.0/libgputils/gpreadobj.c:100: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). infile = fopen(filename,"rb"); data/gputils-1.4.0/libgputils/gpreadobj.c:252: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[9]; data/gputils-1.4.0/libgputils/gpreadobj.c:261: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(buffer, &file[0], 8); data/gputils-1.4.0/libgputils/gpreadobj.c:477: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(&aux->_aux_symbol.data[0], file, object->symbol_size); data/gputils-1.4.0/libgputils/gpreadobj.c:485: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[9]; data/gputils-1.4.0/libgputils/gpreadobj.c:496: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(buffer, &file[0], 8); data/gputils-1.4.0/libgputils/gpsymbol.c:31:5: [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 b[4]; data/gputils-1.4.0/libgputils/gpsystem.c:360: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_buffer[FILE_BUFFER_SIZE]; data/gputils-1.4.0/libgputils/gpwritehex.c:223: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 hexfilename[BUFSIZ]; data/gputils-1.4.0/libgputils/gpwritehex.c:224: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 lowhex[BUFSIZ]; data/gputils-1.4.0/libgputils/gpwritehex.c:225: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 highhex[BUFSIZ]; data/gputils-1.4.0/libgputils/gpwritehex.c:247:11: [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). hex = fopen(lowhex, "wt"); data/gputils-1.4.0/libgputils/gpwritehex.c:258:11: [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). hex = fopen(highhex, "wt"); data/gputils-1.4.0/libgputils/gpwritehex.c:269:11: [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). hex = fopen(hexfilename, "wt"); data/gputils-1.4.0/libgputils/gpwritehex.c:280:11: [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). hex = fopen(hexfilename, "wt"); data/gputils-1.4.0/libgputils/gpwriteobj.c:48: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(&table[offset], name, sizeof_name); data/gputils-1.4.0/libgputils/gpwriteobj.c:69:27: [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 const unsigned char zero[8]; data/gputils-1.4.0/libgputils/gpwriteobj.c:397:12: [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. unsigned char table[MAX_STRING_TABLE]; /* string table */ data/gputils-1.4.0/libgputils/gpwriteobj.c:404: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). coff = fopen(object->filename, "wb"); data/gputils-1.4.0/libiberty/strndup.c:38:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. extern PTR memcpy (PTR, const PTR, size_t); data/gputils-1.4.0/libiberty/strndup.c:54:19: [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 (char *) memcpy (result, s, len); data/gputils-1.4.0/libiberty/vasprintf.c:79: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 ((PTR) &ap, (PTR) &args, sizeof (va_list)); data/gputils-1.4.0/libiberty/vsnprintf.c:82: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 (s, buf, result+1); data/gputils-1.4.0/libiberty/vsnprintf.c:85: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 (s, buf, n-1); data/gputils-1.4.0/libiberty/vsnprintf.c:116: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[128]; data/gputils-1.4.0/gpasm/cod.c:259: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). len = strlen(s); data/gputils-1.4.0/gpasm/coff.c:637:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buffer, name, sizeof(buffer)); data/gputils-1.4.0/gpasm/directive.c:409:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(state.obj.new_sec_name, ".access_ovr", sizeof(state.obj.new_sec_name)); data/gputils-1.4.0/gpasm/directive.c:417:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(state.obj.new_sec_name, ".access_ovr", sizeof(state.obj.new_sec_name)); data/gputils-1.4.0/gpasm/directive.c:660:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(state.obj.new_sec_name, ".code", sizeof(state.obj.new_sec_name)); data/gputils-1.4.0/gpasm/directive.c:668:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(state.obj.new_sec_name, ".code", sizeof(state.obj.new_sec_name)); data/gputils-1.4.0/gpasm/directive.c:700:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(state.obj.new_sec_name, ".code", sizeof(state.obj.new_sec_name)); data/gputils-1.4.0/gpasm/directive.c:708:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(state.obj.new_sec_name, ".code", sizeof(state.obj.new_sec_name)); data/gputils-1.4.0/gpasm/directive.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(p->value.string) < 255) { data/gputils-1.4.0/gpasm/directive.c:2373:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(state.obj.new_sec_name, ".idata", sizeof(state.obj.new_sec_name)); data/gputils-1.4.0/gpasm/directive.c:2381:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(state.obj.new_sec_name, ".idata", sizeof(state.obj.new_sec_name)); data/gputils-1.4.0/gpasm/directive.c:2412:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(state.obj.new_sec_name, ".idata_acs", sizeof(state.obj.new_sec_name)); data/gputils-1.4.0/gpasm/directive.c:2420:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(state.obj.new_sec_name, ".idata_acs", sizeof(state.obj.new_sec_name)); data/gputils-1.4.0/gpasm/directive.c:3507:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(state.lst.subtitle_name, p->value.string, LEN); data/gputils-1.4.0/gpasm/directive.c:3528:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(state.lst.title_name, p->value.string, LEN); data/gputils-1.4.0/gpasm/directive.c:3598:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(state.obj.new_sec_name, ".udata", sizeof(state.obj.new_sec_name)); data/gputils-1.4.0/gpasm/directive.c:3606:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(state.obj.new_sec_name, ".udata", sizeof(state.obj.new_sec_name)); data/gputils-1.4.0/gpasm/directive.c:3634:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(state.obj.new_sec_name, ".udata_acs", sizeof(state.obj.new_sec_name)); data/gputils-1.4.0/gpasm/directive.c:3642:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(state.obj.new_sec_name, ".udata_acs", sizeof(state.obj.new_sec_name)); data/gputils-1.4.0/gpasm/directive.c:3670:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(state.obj.new_sec_name, ".udata_ovr", sizeof(state.obj.new_sec_name)); data/gputils-1.4.0/gpasm/directive.c:3678:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(state.obj.new_sec_name, ".udata_ovr", sizeof(state.obj.new_sec_name)); data/gputils-1.4.0/gpasm/directive.c:3706:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(state.obj.new_sec_name, ".udata_shr", sizeof(state.obj.new_sec_name)); data/gputils-1.4.0/gpasm/directive.c:3714:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(state.obj.new_sec_name, ".udata_shr", sizeof(state.obj.new_sec_name)); data/gputils-1.4.0/gpasm/gpasm.c:557:32: [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 ((optarg != NULL) && (strlen(optarg) > 0)) { data/gputils-1.4.0/gpasm/gpasm.c:689:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(state.objfilename, optarg, sizeof(state.objfilename)); data/gputils-1.4.0/gpasm/gpasm.c:690:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(state.basefilename, optarg, sizeof(state.basefilename)); data/gputils-1.4.0/gpasm/gpasm.c:876:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(state.basefilename, state.srcfilename, sizeof(state.basefilename)); data/gputils-1.4.0/gpasm/preprocess.c:75: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(subst) == symlen && strncmp(symbol, subst, symlen) == 0) { data/gputils-1.4.0/gpasm/preprocess.c:155: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). int len = strlen(argp->str); data/gputils-1.4.0/gpasm/preprocess.c:267: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). int len = strlen(sub); data/gputils-1.4.0/gpasm/preprocess.c:314: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). int len = strlen(sub); data/gputils-1.4.0/gpasm/preprocess.c:352: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). if ((strlen(iden_tbl[i]) == len) && (strncasecmp(iden, iden_tbl[i], len) == 0)) { data/gputils-1.4.0/gpasm/preprocess.c:629: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). else if ((strlen(subst) == symlen) && (strncmp(symbol, subst, symlen) == 0)) { data/gputils-1.4.0/gpasm/preprocess.c:653: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). int len = strlen(sub); data/gputils-1.4.0/gplink/cod.c:282: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). len = strlen(s); data/gputils-1.4.0/gplink/cod.c:434: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). len = strlen(string); data/gputils-1.4.0/gplink/gplink.c:326:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(file_name, name, sizeof(file_name)); data/gputils-1.4.0/gplink/gplink.c:451:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant character. strncpy(state.basefilename, "a", sizeof(state.basefilename)); data/gputils-1.4.0/gplink/gplink.c:607:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(state.basefilename, optarg, sizeof(state.basefilename)); data/gputils-1.4.0/gputils/dump.c:622: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). j += strlen(DebugMessage); data/gputils-1.4.0/gputils/gplib.c:52: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). for (name = file_name + strlen(file_name) - 1; name >= file_name; --name) { data/gputils-1.4.0/gputils/gpvc.c:182:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(filename, argv[optind], sizeof(filename)); data/gputils-1.4.0/gputils/gpvo.c:46:8: [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). time[strlen(time)-1] = '\0'; data/gputils-1.4.0/header/header_check.c:41:7: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (fgetc(f) != '\n') { data/gputils-1.4.0/include/libiberty.h:311: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). const unsigned long libiberty_len = strlen (libiberty_optr) + 1; \ data/gputils-1.4.0/include/libiberty.h:325: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). libiberty_len = strlen (libiberty_optr) + 1, \ data/gputils-1.4.0/libgputils/gparchive.c:54:3: [1] (buffer) sscanf: 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. sscanf(archive->header.ar_name, "%255s/", name); data/gputils-1.4.0/libgputils/gparchive.c:78:5: [1] (buffer) sscanf: 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. sscanf(archive->header.ar_name, "%255s/", name); data/gputils-1.4.0/libgputils/gparchive.c:105:5: [1] (buffer) sscanf: 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. sscanf(archive->header.ar_name, "%255s/", name); data/gputils-1.4.0/libgputils/gparchive.c:197:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(newmember->header.ar_name, data/gputils-1.4.0/libgputils/gparchive.c:200:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(newmember->header.ar_date, data/gputils-1.4.0/libgputils/gparchive.c:203:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(newmember->header.ar_size, data/gputils-1.4.0/libgputils/gparchive.c:206:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(newmember->header.ar_fmag, data/gputils-1.4.0/libgputils/gparchive.c:434:5: [1] (buffer) sscanf: 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. sscanf(archive->header.ar_name, "%255s/", name); data/gputils-1.4.0/libgputils/gparchive.c:482: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). indexsize += strlen(symname) + 1 + AR_INDEX_OFFSET_SIZ; data/gputils-1.4.0/libgputils/gparchive.c:505:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(newmember->header.ar_size, size, sizeof(newmember->header.ar_size)); data/gputils-1.4.0/libgputils/gparchive.c:506:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(newmember->header.ar_fmag, ARMAG, sizeof(newmember->header.ar_fmag)); data/gputils-1.4.0/libgputils/gparchive.c:530: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). const size_t symbol_len = strlen(symbol_name) + 1; data/gputils-1.4.0/libgputils/gparchive.c:607: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). name += strlen(name) + 1; data/gputils-1.4.0/libgputils/gparchive.c:642:5: [1] (buffer) sscanf: 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. sscanf(member->header.ar_name, "%255s/", name); data/gputils-1.4.0/libgputils/gpcfg.c:169: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). headlen = strlen(Head); data/gputils-1.4.0/libgputils/gpcfg.c:176: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). len = strlen((*opt)->name); data/gputils-1.4.0/libgputils/gpcfg.c:291: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). len = strlen(dir->name); data/gputils-1.4.0/libgputils/gpcod.c:31: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(src); data/gputils-1.4.0/libgputils/gpcofflink.c:525: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(name); data/gputils-1.4.0/libgputils/gpdis.c:2975:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buffer, dasmbuf, buffer_length); data/gputils-1.4.0/libgputils/gpprocessor.c:752: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). length = strlen(pics[i].names[FAVORITE]); data/gputils-1.4.0/libgputils/gpreadobj.c:420:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). } read; data/gputils-1.4.0/libgputils/gpreadobj.c:460:74: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). aux->_aux_symbol._aux_fcn_calls.callee = lazy_linking[calleendx].read.symbol; data/gputils-1.4.0/libgputils/gpreadobj.c:468:25: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). lazy_linking[i].read.aux = aux; data/gputils-1.4.0/libgputils/gpreadobj.c:532:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). lazy_linking[i].read.symbol = symbol; data/gputils-1.4.0/libgputils/gpreadobj.c:537:26: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). switch(current_lazy->read.aux->type) { data/gputils-1.4.0/libgputils/gpreadobj.c:539:23: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). current_lazy->read.aux->_aux_symbol._aux_fcn_calls.callee = symbol; data/gputils-1.4.0/libgputils/gpsymbol.c:55: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). return hashfunc_len(t, s, strlen(s)); data/gputils-1.4.0/libgputils/gpsymbol.c:60: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). return (n == strlen(s2)) ? strncasecmp(s1, s2, n) : -1; data/gputils-1.4.0/libgputils/gpsymbol.c:65: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). return (n == strlen(s2)) ? strncmp(s1, s2, n) : -1; data/gputils-1.4.0/libgputils/gpwriteobj.c:36: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). size_t sizeof_name = strlen(name) + 1; data/gputils-1.4.0/libgputils/gpwriteobj.c:66: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). length = strlen(name); data/gputils-1.4.0/libiberty/getopt.c:238: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 (!defined __STDC__ || !__STDC__) && !defined strlen data/gputils-1.4.0/libiberty/getopt.c:241: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). extern int strlen (const char *); data/gputils-1.4.0/libiberty/getopt.c:439: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). int len = nonoption_flags_max_len = strlen (orig_str); data/gputils-1.4.0/libiberty/getopt.c:660: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). == (unsigned int) strlen (p->name)) data/gputils-1.4.0/libiberty/getopt.c:684: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). nextchar += strlen (nextchar); data/gputils-1.4.0/libiberty/getopt.c:715: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). nextchar += strlen (nextchar); data/gputils-1.4.0/libiberty/getopt.c:732: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). nextchar += strlen (nextchar); data/gputils-1.4.0/libiberty/getopt.c:737: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). nextchar += strlen (nextchar); data/gputils-1.4.0/libiberty/getopt.c:848: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 ((unsigned int) (nameend - nextchar) == strlen (p->name)) data/gputils-1.4.0/libiberty/getopt.c:871: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). nextchar += strlen (nextchar); data/gputils-1.4.0/libiberty/getopt.c:891: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). nextchar += strlen (nextchar); data/gputils-1.4.0/libiberty/getopt.c:905: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). nextchar += strlen (nextchar); data/gputils-1.4.0/libiberty/getopt.c:909: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). nextchar += strlen (nextchar); data/gputils-1.4.0/libiberty/strndup.c:36: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). extern size_t strlen (const char*); data/gputils-1.4.0/libiberty/strndup.c:44: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_t len = strlen (s); data/gputils-1.4.0/libiberty/vasprintf.c:73: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). int total_width = strlen (format) + 1; data/gputils-1.4.0/libiberty/vasprintf.c:132:23: [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). total_width += strlen (va_arg (ap, char *)); data/gputils-1.4.0/libiberty/vasprintf.c:178: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 (result) < (size_t) global_total_width) data/gputils-1.4.0/libiberty/vsnprintf.c:78: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). result = strlen (buf); ANALYSIS SUMMARY: Hits = 347 Lines analyzed = 221442 in approximately 4.98 seconds (44495 lines/second) Physical Source Lines of Code (SLOC) = 196307 Hits@level = [0] 687 [1] 97 [2] 191 [3] 25 [4] 34 [5] 0 Hits@level+ = [0+] 1034 [1+] 347 [2+] 250 [3+] 59 [4+] 34 [5+] 0 Hits/KSLOC@level+ = [0+] 5.26726 [1+] 1.76764 [2+] 1.27352 [3+] 0.30055 [4+] 0.173198 [5+] 0 Dot directories skipped = 1 (--followdotdir overrides) Minimum risk level = 1 Not every hit is necessarily a security vulnerability. There may be other security vulnerabilities; review your code! See 'Secure Programming HOWTO' (https://dwheeler.com/secure-programs) for more information.