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/nasm-2.15.05/test/elftest64.c Examining data/nasm-2.15.05/test/cofftest.c Examining data/nasm-2.15.05/test/objlink.c Examining data/nasm-2.15.05/test/elftest.c Examining data/nasm-2.15.05/test/aouttest.c Examining data/nasm-2.15.05/common/common.c Examining data/nasm-2.15.05/include/warnings.h Examining data/nasm-2.15.05/include/insns.h Examining data/nasm-2.15.05/include/hashtbl.h Examining data/nasm-2.15.05/include/error.h Examining data/nasm-2.15.05/include/ilog2.h Examining data/nasm-2.15.05/include/perfhash.h Examining data/nasm-2.15.05/include/rdoff.h Examining data/nasm-2.15.05/include/nasm.h Examining data/nasm-2.15.05/include/nasmint.h Examining data/nasm-2.15.05/include/raa.h Examining data/nasm-2.15.05/include/md5.h Examining data/nasm-2.15.05/include/opflags.h Examining data/nasm-2.15.05/include/iflag.h Examining data/nasm-2.15.05/include/tables.h Examining data/nasm-2.15.05/include/bytesex.h Examining data/nasm-2.15.05/include/disp8.h Examining data/nasm-2.15.05/include/rbtree.h Examining data/nasm-2.15.05/include/labels.h Examining data/nasm-2.15.05/include/compiler.h Examining data/nasm-2.15.05/include/strlist.h Examining data/nasm-2.15.05/include/nctype.h Examining data/nasm-2.15.05/include/nasmlib.h Examining data/nasm-2.15.05/include/saa.h Examining data/nasm-2.15.05/include/ver.h Examining data/nasm-2.15.05/stdlib/strlcpy.c Examining data/nasm-2.15.05/stdlib/vsnprintf.c Examining data/nasm-2.15.05/stdlib/strrchrnul.c Examining data/nasm-2.15.05/stdlib/snprintf.c Examining data/nasm-2.15.05/stdlib/strnlen.c Examining data/nasm-2.15.05/disasm/sync.c Examining data/nasm-2.15.05/disasm/disasm.h Examining data/nasm-2.15.05/disasm/sync.h Examining data/nasm-2.15.05/disasm/disasm.c Examining data/nasm-2.15.05/disasm/ndisasm.c Examining data/nasm-2.15.05/nasmlib/md5c.c Examining data/nasm-2.15.05/nasmlib/alloc.c Examining data/nasm-2.15.05/nasmlib/rbtree.c Examining data/nasm-2.15.05/nasmlib/rlimit.c Examining data/nasm-2.15.05/nasmlib/badenum.c Examining data/nasm-2.15.05/nasmlib/mmap.c Examining data/nasm-2.15.05/nasmlib/zerobuf.c Examining data/nasm-2.15.05/nasmlib/crc64.c Examining data/nasm-2.15.05/nasmlib/saa.c Examining data/nasm-2.15.05/nasmlib/raa.c Examining data/nasm-2.15.05/nasmlib/nctype.c Examining data/nasm-2.15.05/nasmlib/bsi.c Examining data/nasm-2.15.05/nasmlib/errfile.c Examining data/nasm-2.15.05/nasmlib/perfhash.c Examining data/nasm-2.15.05/nasmlib/strlist.c Examining data/nasm-2.15.05/nasmlib/hashtbl.c Examining data/nasm-2.15.05/nasmlib/filename.c Examining data/nasm-2.15.05/nasmlib/file.c Examining data/nasm-2.15.05/nasmlib/path.c Examining data/nasm-2.15.05/nasmlib/alloc.h Examining data/nasm-2.15.05/nasmlib/asprintf.c Examining data/nasm-2.15.05/nasmlib/file.h Examining data/nasm-2.15.05/nasmlib/realpath.c Examining data/nasm-2.15.05/nasmlib/string.c Examining data/nasm-2.15.05/nasmlib/readnum.c Examining data/nasm-2.15.05/nasmlib/ilog2.c Examining data/nasm-2.15.05/nasmlib/ver.c Examining data/nasm-2.15.05/misc/omfdump.c Examining data/nasm-2.15.05/misc/crcgen.c Examining data/nasm-2.15.05/misc/xcrcgen.c Examining data/nasm-2.15.05/macros/macros.c Examining data/nasm-2.15.05/config/watcom.h Examining data/nasm-2.15.05/config/msvc.h Examining data/nasm-2.15.05/config/unknown.h Examining data/nasm-2.15.05/config/unconfig.h Examining data/nasm-2.15.05/asm/preproc.h Examining data/nasm-2.15.05/asm/preproc-nop.c Examining data/nasm-2.15.05/asm/tokens.h Examining data/nasm-2.15.05/asm/pptok.h Examining data/nasm-2.15.05/asm/stdscan.c Examining data/nasm-2.15.05/asm/pragma.c Examining data/nasm-2.15.05/asm/srcfile.h Examining data/nasm-2.15.05/asm/srcfile.c Examining data/nasm-2.15.05/asm/warnings.c Examining data/nasm-2.15.05/asm/error.c Examining data/nasm-2.15.05/asm/labels.c Examining data/nasm-2.15.05/asm/eval.h Examining data/nasm-2.15.05/asm/directiv.h Examining data/nasm-2.15.05/asm/assemble.h Examining data/nasm-2.15.05/asm/parser.h Examining data/nasm-2.15.05/asm/floats.h Examining data/nasm-2.15.05/asm/assemble.c Examining data/nasm-2.15.05/asm/listing.c Examining data/nasm-2.15.05/asm/tokhash.c Examining data/nasm-2.15.05/asm/preproc.c Examining data/nasm-2.15.05/asm/floats.c Examining data/nasm-2.15.05/asm/exprdump.c Examining data/nasm-2.15.05/asm/pptok.c Examining data/nasm-2.15.05/asm/parser.c Examining data/nasm-2.15.05/asm/quote.h Examining data/nasm-2.15.05/asm/quote.c Examining data/nasm-2.15.05/asm/segalloc.c Examining data/nasm-2.15.05/asm/exprlib.c Examining data/nasm-2.15.05/asm/directiv.c Examining data/nasm-2.15.05/asm/listing.h Examining data/nasm-2.15.05/asm/directbl.c Examining data/nasm-2.15.05/asm/stdscan.h Examining data/nasm-2.15.05/asm/rdstrnum.c Examining data/nasm-2.15.05/asm/strfunc.c Examining data/nasm-2.15.05/asm/eval.c Examining data/nasm-2.15.05/asm/nasm.c Examining data/nasm-2.15.05/rdoff/segtab.c Examining data/nasm-2.15.05/rdoff/rdlib.h Examining data/nasm-2.15.05/rdoff/rdlib.c Examining data/nasm-2.15.05/rdoff/symtab.c Examining data/nasm-2.15.05/rdoff/segtab.h Examining data/nasm-2.15.05/rdoff/hash.c Examining data/nasm-2.15.05/rdoff/rdfutils.h Examining data/nasm-2.15.05/rdoff/rdoff.c Examining data/nasm-2.15.05/rdoff/ldsegs.h Examining data/nasm-2.15.05/rdoff/rdlar.c Examining data/nasm-2.15.05/rdoff/rdf2bin.c Examining data/nasm-2.15.05/rdoff/symtab.h Examining data/nasm-2.15.05/rdoff/collectn.c Examining data/nasm-2.15.05/rdoff/rdfload.h Examining data/nasm-2.15.05/rdoff/rdflib.c Examining data/nasm-2.15.05/rdoff/rdfload.c Examining data/nasm-2.15.05/rdoff/ldrdf.c Examining data/nasm-2.15.05/rdoff/rdx.c Examining data/nasm-2.15.05/rdoff/collectn.h Examining data/nasm-2.15.05/rdoff/rdlar.h Examining data/nasm-2.15.05/rdoff/hash.h Examining data/nasm-2.15.05/rdoff/rdfdump.c Examining data/nasm-2.15.05/output/legacy.c Examining data/nasm-2.15.05/output/elf.h Examining data/nasm-2.15.05/output/nulldbg.c Examining data/nasm-2.15.05/output/outform.h Examining data/nasm-2.15.05/output/stabs.h Examining data/nasm-2.15.05/output/outobj.c Examining data/nasm-2.15.05/output/codeview.c Examining data/nasm-2.15.05/output/outform.c Examining data/nasm-2.15.05/output/outlib.c Examining data/nasm-2.15.05/output/outbin.c Examining data/nasm-2.15.05/output/outieee.c Examining data/nasm-2.15.05/output/outaout.c Examining data/nasm-2.15.05/output/outdbg.c Examining data/nasm-2.15.05/output/outmacho.c Examining data/nasm-2.15.05/output/outrdf2.c Examining data/nasm-2.15.05/output/nullout.c Examining data/nasm-2.15.05/output/outlib.h Examining data/nasm-2.15.05/output/outcoff.c Examining data/nasm-2.15.05/output/outelf.h Examining data/nasm-2.15.05/output/pecoff.h Examining data/nasm-2.15.05/output/dwarf.h Examining data/nasm-2.15.05/output/outelf.c Examining data/nasm-2.15.05/output/outas86.c Examining data/nasm-2.15.05/output/macho.h Examining data/nasm-2.15.05/x86/insnsi.h Examining data/nasm-2.15.05/x86/regvals.c Examining data/nasm-2.15.05/x86/insnsa.c Examining data/nasm-2.15.05/x86/regs.h Examining data/nasm-2.15.05/x86/regflags.c Examining data/nasm-2.15.05/x86/disp8.c Examining data/nasm-2.15.05/x86/regdis.h Examining data/nasm-2.15.05/x86/insnsn.c Examining data/nasm-2.15.05/x86/iflag.c Examining data/nasm-2.15.05/x86/insnsb.c Examining data/nasm-2.15.05/x86/regdis.c Examining data/nasm-2.15.05/x86/insnsd.c Examining data/nasm-2.15.05/x86/regs.c Examining data/nasm-2.15.05/x86/iflaggen.h Examining data/nasm-2.15.05/version.h FINAL RESULTS: data/nasm-2.15.05/asm/floats.c:91:20: [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 dprintf(x) printf x data/nasm-2.15.05/asm/listing.c:171:5: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(listdata, str); data/nasm-2.15.05/asm/listing.c:203: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(buf, sizeof buf, fmt, tag, size); data/nasm-2.15.05/asm/nasm.c:328:9: [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(temp, sizeof temp, "__?POSIX_TIME?__=%"PRId64, oct->posix); data/nasm-2.15.05/asm/nasm.c:1995: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(error_file, fmt, args); data/nasm-2.15.05/asm/preproc-nop.c:118:24: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. int conv = sscanf(buffer + 5, "%"PRId32"+%d %s", &ln, &li, nm); data/nasm-2.15.05/config/msvc.h:84:10: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. # define access _access data/nasm-2.15.05/config/msvc.h:96:10: [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. # define snprintf _snprintf data/nasm-2.15.05/config/msvc.h:96:19: [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. # define snprintf _snprintf data/nasm-2.15.05/disasm/ndisasm.c:72: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(stderr, fmt, val); data/nasm-2.15.05/disasm/ndisasm.c:272:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, help, pname); data/nasm-2.15.05/include/compiler.h:150:11: [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. # define snprintf _snprintf data/nasm-2.15.05/include/compiler.h:150:20: [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. # define snprintf _snprintf data/nasm-2.15.05/include/compiler.h:152: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. int snprintf(char *, size_t, const char *, ...); data/nasm-2.15.05/include/compiler.h:158:11: [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. # define vsnprintf _vsnprintf data/nasm-2.15.05/include/compiler.h:160: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(char *, size_t, const char *, va_list); data/nasm-2.15.05/include/compiler.h:327:49: [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 printf_func(fmt, list) format_func3(printf,fmt,list) data/nasm-2.15.05/include/compiler.h:328:53: [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 printf_func_ptr(fmt, list) format_func3_ptr(printf,fmt,list) data/nasm-2.15.05/include/compiler.h:329:49: [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 vprintf_func(fmt) format_func3(printf,fmt,0) data/nasm-2.15.05/include/compiler.h:330:53: [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 vprintf_func_ptr(fmt) format_func3_ptr(printf,fmt,0) data/nasm-2.15.05/nasmlib/asprintf.c:57:13: [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. bytes = vsnprintf(NULL, 0, fmt, xap) + 1; data/nasm-2.15.05/nasmlib/asprintf.c:63: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. vsnprintf(strp+extra, bytes, fmt, ap); data/nasm-2.15.05/nasmlib/file.h:151:20: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. # define os_access access data/nasm-2.15.05/output/outbin.c:1188:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(label_name + 8, sec->name); data/nasm-2.15.05/output/outcoff.c:465:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(sym->name, name); data/nasm-2.15.05/output/outcoff.c:701:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(newS->String, name); data/nasm-2.15.05/output/outdbg.c:202:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(ofile, data/nasm-2.15.05/output/outdbg.c:217:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(ofile, " target %"PRIx32":%"PRIx64, data/nasm-2.15.05/output/outdbg.c:220:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(ofile, " wrt %"PRIx32, data->twrt); data/nasm-2.15.05/output/outdbg.c:223:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(ofile, " relbase %"PRIx64, data->relbase); data/nasm-2.15.05/output/outelf.c:2696:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(stabs_filename, filename); data/nasm-2.15.05/output/outelf.c:2706:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(stabs_filename, filename); data/nasm-2.15.05/output/outelf.c:2799:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy((char *)ssbuf + fileidx[i], allfiles[i]); data/nasm-2.15.05/output/outelf.c:3598:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(dwarf_clist->filename,fname); data/nasm-2.15.05/output/outieee.c:1138:9: [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, sizeof(buffer), format, ap); data/nasm-2.15.05/output/outieee.c:1265:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(dest, source); data/nasm-2.15.05/output/outieee.c:1346:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(fn->name, lnfname); data/nasm-2.15.05/output/outobj.c:2528:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(fn->name, lnfname); data/nasm-2.15.05/output/outrdf2.c:393:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(ci.label, name); data/nasm-2.15.05/output/outrdf2.c:466:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(ri.label, name); data/nasm-2.15.05/output/outrdf2.c:477:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(r.label, name); data/nasm-2.15.05/output/outrdf2.c:717:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(r.libname, value); data/nasm-2.15.05/output/outrdf2.c:731:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(r.modname, value); data/nasm-2.15.05/rdoff/ldrdf.c:778:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(hr->m.modname, modname_specified); data/nasm-2.15.05/rdoff/rdfdump.c:103:13: [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((flags & SYM_IMPORT) ? " import" : " extern"); data/nasm-2.15.05/rdoff/rdfdump.c:130:13: [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((flags & SYM_GLOBAL) ? " export" : " public"); data/nasm-2.15.05/rdoff/rdfload.c:201:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(e.name, r->e.label); data/nasm-2.15.05/rdoff/rdlar.c:131: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(stderr, fmt, ap); data/nasm-2.15.05/rdoff/rdlar.c:332:13: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(argv[2], F_OK) < 0) { data/nasm-2.15.05/rdoff/rdlib.c:70:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(lastverified, filename); data/nasm-2.15.05/rdoff/rdlib.c:152:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(buf, lib->name); data/nasm-2.15.05/rdoff/rdlib.c:230:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(buf, lib->name); data/nasm-2.15.05/rdoff/rdoff.c:235: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(stderr, fmt, val); data/nasm-2.15.05/stdlib/snprintf.c:14: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. int snprintf(char *str, size_t size, const char *format, ...) data/nasm-2.15.05/stdlib/snprintf.c:20:10: [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. rv = vsnprintf(str, size, format, ap); data/nasm-2.15.05/stdlib/vsnprintf.c:20: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(char *str, size_t size, const char *format, va_list ap) data/nasm-2.15.05/stdlib/vsnprintf.c:30:10: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. rv = vsprintf(snprintf_buffer, format, ap); data/nasm-2.15.05/asm/nasm.c:1481:15: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. envreal = getenv("NASMENV"); data/nasm-2.15.05/asm/preproc.c:865: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. v = getenv(txt); data/nasm-2.15.05/nasmlib/realpath.c:73:10: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. rp = realpath(rel_path, NULL); data/nasm-2.15.05/nasmlib/realpath.c:96:14: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. if (!realpath(rel_path, rp)) { data/nasm-2.15.05/asm/directbl.c:8: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. const char * const directive_tbl[40] = { data/nasm-2.15.05/asm/directiv.c:119:13: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int i = atoi(value); data/nasm-2.15.05/asm/directiv.c:398:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char debugid[128]; data/nasm-2.15.05/asm/directiv.h:58: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. extern const char * const directive_tbl[40]; data/nasm-2.15.05/asm/error.c:118: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(ws->state, warning_state, sizeof warning_state); data/nasm-2.15.05/asm/error.c:128: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(warning_state, ws->state, sizeof warning_state); data/nasm-2.15.05/asm/error.c:163: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(warning_state, ws->state, sizeof warning_state); data/nasm-2.15.05/asm/exprdump.c:44: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. static char seg_str[64]; data/nasm-2.15.05/asm/floats.c:200: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 digits[MANT_DIGITS]; data/nasm-2.15.05/asm/floats.c:586:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(mant, mult, MANT_LIMBS*sizeof(fp_limb)); data/nasm-2.15.05/asm/labels.c:127: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[PERMTS_SIZE]; /* ... the data block itself */ data/nasm-2.15.05/asm/labels.c:658: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(p, string, len); data/nasm-2.15.05/asm/labels.c:672: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(p, s1, l1); data/nasm-2.15.05/asm/labels.c:673: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(p+l1, s2, l2); data/nasm-2.15.05/asm/labels.c:674: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(p+l1+l2, s3, l3); data/nasm-2.15.05/asm/listing.c:58: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 listline[LIST_MAX_LEN]; data/nasm-2.15.05/asm/listing.c:63: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 listdata[2 * LIST_INDENT]; /* we need less than that actually */ data/nasm-2.15.05/asm/listing.c:177: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 q[20]; data/nasm-2.15.05/asm/listing.c:195: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 buf[64]; data/nasm-2.15.05/asm/listing.c:209: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 q[24]; data/nasm-2.15.05/asm/listing.c:290: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(listline + LIST_MAX_LEN-4, "...", 4); data/nasm-2.15.05/asm/nasm.c:303: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 temp[128]; data/nasm-2.15.05/asm/nasm.c:1455: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 str[2048]; data/nasm-2.15.05/asm/nasm.c:1476: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(warning_state, warning_default, sizeof warning_state); data/nasm-2.15.05/asm/nasm.c:1912: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 * const error_pfx_table[ERR_MASK+1] = { data/nasm-2.15.05/asm/nasm.c:2122: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 warnsuf[64]; /* Warning suffix */ data/nasm-2.15.05/asm/nasm.c:2123: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 linestr[64]; /* Formatted line number if applicable */ data/nasm-2.15.05/asm/pptok.c:10: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. const char * const pp_directives[118] = { data/nasm-2.15.05/asm/preproc.c:182: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 a[INLINE_TEXT+1]; data/nasm-2.15.05/asm/preproc.c:184: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 pad[INLINE_TEXT+1 - sizeof(char *)]; data/nasm-2.15.05/asm/preproc.c:388: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(textp, text, len); data/nasm-2.15.05/asm/preproc.c:410:10: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. textp = memcpy(t->text.a, text, len); data/nasm-2.15.05/asm/preproc.c:427: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. return memcpy(p, tok_text(t), size); data/nasm-2.15.05/asm/preproc.c:738:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(t->text.a, p, t->len); data/nasm-2.15.05/asm/preproc.c:768:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(t->text.a, p, t->len); data/nasm-2.15.05/asm/preproc.c:927:21: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(line + 1, "if 0"); data/nasm-2.15.05/asm/preproc.c:929:21: [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(line + 1, p, len + 1); data/nasm-2.15.05/asm/preproc.c:1206: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(strx, str, l); data/nasm-2.15.05/asm/preproc.c:1256: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. memcpy(q, pp_directives[ndir], pp_directives_len[ndir]); data/nasm-2.15.05/asm/preproc.c:1882: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. memcpy(textp, text, txtlen); data/nasm-2.15.05/asm/preproc.c:1914:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(t->text.a, text, txtlen); data/nasm-2.15.05/asm/preproc.c:1927: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(t, src, sizeof *src); data/nasm-2.15.05/asm/preproc.c:1932:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(t->text.p.ptr, src->text.p.ptr, t->len+1); data/nasm-2.15.05/asm/preproc.c:1959:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((char *)dst + sizeof(Token *), (char *)src + sizeof(Token *), data/nasm-2.15.05/asm/preproc.c:2850: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(p, tok_text(t), t->len); data/nasm-2.15.05/asm/preproc.c:2864:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p, tok_text(&m->params[i].name), m->params[i].name.len); data/nasm-2.15.05/asm/preproc.c:2878: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(p, m->name, namelen); data/nasm-2.15.05/asm/preproc.c:2882:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p, context_prefix, context_len); data/nasm-2.15.05/asm/preproc.c:3719: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 directive[256]; data/nasm-2.15.05/asm/preproc.c:3781:6: [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 directive[256]; data/nasm-2.15.05/asm/preproc.c:5903:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(¶ms[nparam+1], &m->defaults[nparam+1-m->nparam_min], data/nasm-2.15.05/asm/preproc.c:7096: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 numbuf[32]; data/nasm-2.15.05/asm/quote.c:116:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(nstr+1, str, len); data/nasm-2.15.05/asm/stdscan.c:91: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(text, p, len); data/nasm-2.15.05/asm/tokhash.c:10651: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 lcbuf[18]; data/nasm-2.15.05/asm/warnings.c:3: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. const char * const warning_name[39] = { data/nasm-2.15.05/asm/warnings.c:90: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. const char * const warning_help[39] = { data/nasm-2.15.05/disasm/disasm.c:805: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. memcpy(ins->evex_p, prefix->evex, 3); data/nasm-2.15.05/disasm/disasm.c:1130: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 * const condition_name[16] = { data/nasm-2.15.05/disasm/ndisasm.c:85: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 buffer[INSN_MAX * 2], *p, *ep, *q; data/nasm-2.15.05/disasm/ndisasm.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 outbuf[256]; data/nasm-2.15.05/disasm/ndisasm.c:277:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(filename, "rb"); data/nasm-2.15.05/disasm/ndisasm.c:382: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 buffer[256]; /* should fit on most stacks :-) */ data/nasm-2.15.05/include/bytesex.h:254: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. memcpy(_wa_p, &_wa_v, _wa_s); \ data/nasm-2.15.05/include/compiler.h:251:20: [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(dst, src, n) + n; data/nasm-2.15.05/include/compiler.h:378:28: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. # define va_copy(dst,src) memcpy(&(dst),&(src),sizeof(va_list)) data/nasm-2.15.05/include/md5.h:11: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. unsigned char in[64]; data/nasm-2.15.05/include/md5.h:17:33: [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 void MD5Final(unsigned char digest[MD5_HASHBYTES], MD5_CTX *context); data/nasm-2.15.05/include/nctype.h:44:17: [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 unsigned char nasm_tolower_tab[256]; data/nasm-2.15.05/include/rdoff.h:80: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[128]; data/nasm-2.15.05/include/rdoff.h:108: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 label[EXIM_LABEL_MAX]; /* zero terminated, should be written to file data/nasm-2.15.05/include/rdoff.h:121: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 label[EXIM_LABEL_MAX]; /* zero terminated as in import */ data/nasm-2.15.05/include/rdoff.h:130: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 libname[MODLIB_NAME_MAX]; /* name of library to link with at load time */ data/nasm-2.15.05/include/rdoff.h: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 modname[MODLIB_NAME_MAX]; /* module name */ data/nasm-2.15.05/include/rdoff.h:160: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 label[EXIM_LABEL_MAX]; /* zero terminated as in import */ data/nasm-2.15.05/include/strlist.h:50:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[1]; data/nasm-2.15.05/include/warnings.h:97: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. extern const char * const warning_name[39]; data/nasm-2.15.05/include/warnings.h:98: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. extern const char * const warning_help[39]; data/nasm-2.15.05/misc/omfdump.c:22: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 *record_types[256] = data/nasm-2.15.05/misc/omfdump.c:170:18: [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 *coment_class[256] = { data/nasm-2.15.05/misc/omfdump.c:264: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(s, p+1, len); data/nasm-2.15.05/misc/omfdump.c:300:18: [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 * const alignment[8] = data/nasm-2.15.05/misc/omfdump.c:302:18: [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 * const combine[8] = data/nasm-2.15.05/misc/omfdump.c:365:18: [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 * const method_base[4] = data/nasm-2.15.05/misc/omfdump.c:507:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(argv[i], O_RDONLY); data/nasm-2.15.05/misc/xcrcgen.c:20:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open("/dev/urandom", O_RDONLY); data/nasm-2.15.05/nasmlib/alloc.c:118: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. return memcpy(p, s, size); data/nasm-2.15.05/nasmlib/alloc.c:129: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. return memcpy(p, s, len); data/nasm-2.15.05/nasmlib/alloc.c:140: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(rslt, one, l1); data/nasm-2.15.05/nasmlib/alloc.c:141: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(rslt + l1, two, s2); data/nasm-2.15.05/nasmlib/alloc.c:187:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(q, p, l); data/nasm-2.15.05/nasmlib/badenum.c:39: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. static char buf[64]; data/nasm-2.15.05/nasmlib/file.h:142: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). # define os_fopen fopen data/nasm-2.15.05/nasmlib/filename.c:59: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(p, inname, baselen); data/nasm-2.15.05/nasmlib/filename.c:60: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(p+baselen, extension, elen+1); data/nasm-2.15.05/nasmlib/md5c.c:79:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p, buf, len); data/nasm-2.15.05/nasmlib/md5c.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(p, buf, t); data/nasm-2.15.05/nasmlib/md5c.c:91: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(ctx->in, buf, 64); data/nasm-2.15.05/nasmlib/md5c.c:100: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(ctx->in, buf, len); data/nasm-2.15.05/nasmlib/md5c.c:107:24: [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. void MD5Final(unsigned char digest[16], MD5_CTX *ctx) data/nasm-2.15.05/nasmlib/md5c.c:144: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(digest, ctx->buf, 16); data/nasm-2.15.05/nasmlib/nctype.c:41: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 nasm_tolower_tab[256]; data/nasm-2.15.05/nasmlib/path.c:177: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(pp, dir, dl); data/nasm-2.15.05/nasmlib/path.c:182: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(pp, file, fl+1); data/nasm-2.15.05/nasmlib/saa.c:132: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(*s->wblk + s->wpos, d, l); data/nasm-2.15.05/nasmlib/saa.c:235:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(d, p, l); data/nasm-2.15.05/nasmlib/saa.c:335: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 temp[64], *ptemp; data/nasm-2.15.05/nasmlib/saa.c:356: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 temp[64], *ptemp; data/nasm-2.15.05/nasmlib/strlist.c:94: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(e->str, str, size); data/nasm-2.15.05/nasmlib/ver.c:50: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 * const _nasm_comment[2] = data/nasm-2.15.05/nasmlib/ver.c:56: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 * const _nasm_signature[2] = { data/nasm-2.15.05/output/codeview.c:92: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. unsigned char md5sum[MD5_HASHBYTES]; data/nasm-2.15.05/output/codeview.c:337:28: [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 void calc_md5(const char *const filename, data/nasm-2.15.05/output/codeview.c:338:18: [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 sum[MD5_HASHBYTES]) data/nasm-2.15.05/output/elf.h:453: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. unsigned char e_ident[EI_NIDENT]; data/nasm-2.15.05/output/elf.h:470: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. unsigned char e_ident[EI_NIDENT]; data/nasm-2.15.05/output/macho.h:182:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char segname[16]; data/nasm-2.15.05/output/macho.h:196:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char segname[16]; data/nasm-2.15.05/output/macho.h:208:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char sectname[16]; data/nasm-2.15.05/output/macho.h:209:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char segname[16]; data/nasm-2.15.05/output/macho.h:222:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char sectname[16]; data/nasm-2.15.05/output/macho.h:223:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char segname[16]; data/nasm-2.15.05/output/outas86.c:520:17: [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/nasm-2.15.05/output/outbin.c:1187:9: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(label_name, "section."); data/nasm-2.15.05/output/outbin.c:1191:9: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(label_name + base_len, ".start"); data/nasm-2.15.05/output/outbin.c:1195:9: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(label_name + base_len, ".vstart"); data/nasm-2.15.05/output/outbin.c:1421: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 buf[1+2+4+2+255*2+2+2]; data/nasm-2.15.05/output/outbin.c:1433:10: [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. p += sprintf(p, ":%02X%04X%02X", len, addr, type); data/nasm-2.15.05/output/outbin.c:1435:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. p += sprintf(p, "%02X", dptr[i]); data/nasm-2.15.05/output/outbin.c:1436:10: [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. p += sprintf(p, "%02X\n", csum); data/nasm-2.15.05/output/outbin.c:1492: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 buf[2+2+8+255*2+2+2]; data/nasm-2.15.05/output/outbin.c:1518:10: [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. p += sprintf(p, "S%c%02X%0*X", type, len+alen+1, alen*2, addr); data/nasm-2.15.05/output/outbin.c:1520:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. p += sprintf(p, "%02X", dptr[i]); data/nasm-2.15.05/output/outbin.c:1521:10: [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. p += sprintf(p, "%02X\n", csum); data/nasm-2.15.05/output/outcoff.c:375:38: [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). unsigned int align = atoi(q + 6); data/nasm-2.15.05/output/outcoff.c:828:30: [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 value[4],*p=value; data/nasm-2.15.05/output/outcoff.c:978: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 padname[8]; data/nasm-2.15.05/output/outcoff.c:1055: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 padname[8]; data/nasm-2.15.05/output/outcoff.c:1075: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 filename[18]; data/nasm-2.15.05/output/outdbg.c: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. static char invalid_buf[64]; data/nasm-2.15.05/output/outdbg.c:176: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(invalid_buf, "[invalid type %d]", type); data/nasm-2.15.05/output/outdbg.c:190: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. static char invalid_buf[64]; data/nasm-2.15.05/output/outdbg.c:193: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(invalid_buf, "[invalid sign %d]", sign); data/nasm-2.15.05/output/outelf.c:86: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 elf_module[FILENAME_MAX]; data/nasm-2.15.05/output/outelf.c:219: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 relpfx[8]; /* Relocation section prefix */ data/nasm-2.15.05/output/outelf.c:282: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]; data/nasm-2.15.05/output/outelf.c:647: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(shstrtab + shstrtablen, firsthalf, l1); data/nasm-2.15.05/output/outelf.c:649: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(shstrtab + shstrtablen, secondhalf, l2+1); data/nasm-2.15.05/output/outelf.c:1920: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(&ehdr.com.e_ident[EI_MAG0], ELFMAG, SELFMAG); data/nasm-2.15.05/output/outform.c:116: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 prefixbuf[32]; data/nasm-2.15.05/output/outieee.c:86: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 ieee_infile[FILENAME_MAX]; data/nasm-2.15.05/output/outieee.c:642: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(f, fix, sizeof(struct ieeeFixupp)); data/nasm-2.15.05/output/outieee.c:925:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/nasm-2.15.05/output/outieee.c:975:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/nasm-2.15.05/output/outieee.c:996:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/nasm-2.15.05/output/outieee.c:1020:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/nasm-2.15.05/output/outieee.c:1047:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/nasm-2.15.05/output/outieee.c:1133: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 buffer[256]; data/nasm-2.15.05/output/outieee.c:1206: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 buf[40]; data/nasm-2.15.05/output/outieee.c:1211:13: [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, "%"PRIX32"", -p->id1); data/nasm-2.15.05/output/outieee.c:1213:13: [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, "L%"PRIX32",10,/", p->id1); data/nasm-2.15.05/output/outieee.c:1216: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, "R%"PRIX32",%"PRIX32",+", p->id1, p->addend); data/nasm-2.15.05/output/outieee.c:1219: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, "R%"PRIX32",%"PRIX32",+,P,-,%X,-", p->id1, p->addend, p->size); data/nasm-2.15.05/output/outieee.c:1224:13: [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, "R%"PRIX32",%"PRIX32",+,L%"PRIX32",+,%"PRIX32",-", p->id2, p->addend, data/nasm-2.15.05/output/outieee.c:1227:13: [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, "R%"PRIX32",%"PRIX32",+,L%"PRIX32",+,L%"PRIX32",-", p->id2, p->addend, data/nasm-2.15.05/output/outieee.c:1231: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, "X%"PRIX32"", p->id1); data/nasm-2.15.05/output/outieee.c:1234: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, "X%"PRIX32",P,-,%"PRIX32",-", p->id1, size); data/nasm-2.15.05/output/outieee.c:1241: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, "Y%"PRIX32",10,/", p->id1); data/nasm-2.15.05/output/outieee.c:1245:13: [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, "X%"PRIX32",Y%"PRIX32",+,%"PRIX32",-", p->id2, p->id2, data/nasm-2.15.05/output/outieee.c:1248:13: [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, "X%"PRIX32",Y%"PRIX32",+,L%"PRIX32",-", p->id2, p->id2, p->id1); data/nasm-2.15.05/output/outmacho.c:125: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 namestr[34]; /* segment,section as a C string */ data/nasm-2.15.05/output/outmacho.c:128: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 sectname[16]; /* what this section is called */ data/nasm-2.15.05/output/outmacho.c:129: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 segname[16]; /* segment this section will be in */ data/nasm-2.15.05/output/outmacho.c:247: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 sect[34]; data/nasm-2.15.05/output/outmacho.c:275: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 sect[34]; data/nasm-2.15.05/output/outobj.c:263:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(nxt->parm, orp->parm, sizeof(orp->parm)); data/nasm-2.15.05/output/outobj.c:272:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(nxt->buf + nxt->committed, orp->buf + committed, used); data/nasm-2.15.05/output/outobj.c:442:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ptr, name, len); data/nasm-2.15.05/output/outobj.c:507: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 obj_infile[FILENAME_MAX]; data/nasm-2.15.05/output/outobj.c:1060: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. memcpy(orp->buf + orp->used, ucdata, len); data/nasm-2.15.05/output/outrdf2.c:70: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 *segmenttypes[COUNT_SEGTYPES] = { data/nasm-2.15.05/output/outrdf2.c:247: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 buf[4], *b; data/nasm-2.15.05/output/outrdf2.c:272: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 buf[4], *b; data/nasm-2.15.05/output/outrdf2.c:289: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 buf[4], *b; data/nasm-2.15.05/output/outrdf2.c:308: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 buf[4], *b; data/nasm-2.15.05/output/outrdf2.c:323: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 buf[4], *b; data/nasm-2.15.05/output/outrdf2.c:486: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 buf[4], *b; data/nasm-2.15.05/output/pecoff.h:505: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[9]; data/nasm-2.15.05/output/pecoff.h:529: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. extern char coff_infile[FILENAME_MAX]; data/nasm-2.15.05/output/pecoff.h:530: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. extern char coff_outfile[FILENAME_MAX]; data/nasm-2.15.05/rdoff/ldrdf.c:671: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(&lastmodule->f, &f, sizeof(f)); data/nasm-2.15.05/rdoff/ldrdf.c:716: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). if ((f = fopen(filename, "wb")) == NULL) { data/nasm-2.15.05/rdoff/ldrdf.c:739: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). if ((ff = fopen(generic_rec_file, "r")) == NULL) { data/nasm-2.15.05/rdoff/ldrdf.c:1188: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 *respstrings[128] = { 0, }; data/nasm-2.15.05/rdoff/ldrdf.c:1222:29: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). options.align = atoi(argv[1]); data/nasm-2.15.05/rdoff/ldrdf.c:1275:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/nasm-2.15.05/rdoff/ldrdf.c:1280:25: [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/nasm-2.15.05/rdoff/rdf2bin.c:101: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 buf[1+2+4+2+255*2+2+2]; data/nasm-2.15.05/rdoff/rdf2bin.c:117:10: [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. p += sprintf(p, ":%02X%04X%02X", len, addr, type); data/nasm-2.15.05/rdoff/rdf2bin.c:119:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. p += sprintf(p, "%02X", dptr[i]); data/nasm-2.15.05/rdoff/rdf2bin.c:120:10: [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. p += sprintf(p, "%02X\n", csum); data/nasm-2.15.05/rdoff/rdf2bin.c:168: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 buf[2+2+8+255*2+2+2]; data/nasm-2.15.05/rdoff/rdf2bin.c:199:10: [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. p += sprintf(p, "S%c%02X%0*X", type, len+alen+1, alen*2, addr); data/nasm-2.15.05/rdoff/rdf2bin.c:201:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. p += sprintf(p, "%02X", dptr[i]); data/nasm-2.15.05/rdoff/rdf2bin.c:202:10: [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. p += sprintf(p, "%02X\n", csum); data/nasm-2.15.05/rdoff/rdf2bin.c:254: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. static char fmt_buf[16]; data/nasm-2.15.05/rdoff/rdf2bin.c:412: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). of = fopen(*argv, fmt->mode); data/nasm-2.15.05/rdoff/rdfdump.c:51: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 buf[129], t, l, s, flags; data/nasm-2.15.05/rdoff/rdfdump.c:199: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 id[7]; data/nasm-2.15.05/rdoff/rdfdump.c:232: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). infile = fopen(argv[1], "rb"); data/nasm-2.15.05/rdoff/rdflib.c:157: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 *p, buf[256], c; data/nasm-2.15.05/rdoff/rdflib.c:161: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 rdbuf[10]; data/nasm-2.15.05/rdoff/rdflib.c:175:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(argv[2], "wb"); data/nasm-2.15.05/rdoff/rdflib.c:195:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(argv[2], "ab"); data/nasm-2.15.05/rdoff/rdflib.c:202: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). fp2 = fopen(argv[3], "rb"); data/nasm-2.15.05/rdoff/rdflib.c:239:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(argv[2], "rb"); data/nasm-2.15.05/rdoff/rdflib.c:261:27: [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). fp2 = fopen(argv[4], "wb"); data/nasm-2.15.05/rdoff/rdflib.c:330:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(argv[2], "rb"); data/nasm-2.15.05/rdoff/rdflib.c:338: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). fp2 = fopen(argv[4], "rb"); data/nasm-2.15.05/rdoff/rdflib.c:346:17: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). fptmp = tmpfile(); data/nasm-2.15.05/rdoff/rdlar.c:215:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). libfp = fopen(libname, "wb"); data/nasm-2.15.05/rdoff/rdlar.c:247:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). modfp = fopen(fname, "rb"); data/nasm-2.15.05/rdoff/rdlar.c:275: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 buf[MAXMODNAMELEN], *p = NULL; data/nasm-2.15.05/rdoff/rdlar.c:338: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). libfp = fopen(argv[2], "ab"); data/nasm-2.15.05/rdoff/rdlar.c:362: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). libfp = fopen(argv[2], "rb"); data/nasm-2.15.05/rdoff/rdlar.c:390:29: [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). modfp = fopen(p, "wb"); data/nasm-2.15.05/rdoff/rdlar.c:423: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). libfp = fopen(argv[2], "rb"); data/nasm-2.15.05/rdoff/rdlar.c:428:17: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). tmpfp = tmpfile(); data/nasm-2.15.05/rdoff/rdlib.c:51: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 *rdl_errors[5] = { data/nasm-2.15.05/rdoff/rdlib.c:60: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 buf[257]; data/nasm-2.15.05/rdoff/rdlib.c:63: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. static char lastverified[256]; data/nasm-2.15.05/rdoff/rdlib.c:69:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(filename, "rb"); data/nasm-2.15.05/rdoff/rdlib.c:128: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 buf[512]; data/nasm-2.15.05/rdoff/rdlib.c:138: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). lib->fp = fopen(lib->name, "rb"); data/nasm-2.15.05/rdoff/rdlib.c:213: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 buf[512]; data/nasm-2.15.05/rdoff/rdlib.c:220: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). lib->fp = fopen(lib->name, "rb"); data/nasm-2.15.05/rdoff/rdoff.c:184: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 *knownsegtypes[8] = { data/nasm-2.15.05/rdoff/rdoff.c:212: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. const char *rdf_errors[11] = { data/nasm-2.15.05/rdoff/rdoff.c:259:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(name, "rb"); data/nasm-2.15.05/rdoff/rdoff.c:268: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 buf[8]; data/nasm-2.15.05/rdoff/symtab.c:137: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 *SegNames[3] = { "code", "data", "bss" }; data/nasm-2.15.05/stdlib/vsnprintf.c:18: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 snprintf_buffer[BUFFER_SIZE]; data/nasm-2.15.05/stdlib/vsnprintf.c:39:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(str, snprintf_buffer, bytes); data/nasm-2.15.05/asm/error.c:242: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). vlen = value ? strlen(value) : 0; data/nasm-2.15.05/asm/labels.c:655: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(string)+1; /* Include final NUL */ data/nasm-2.15.05/asm/labels.c:667: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). size_t l1 = strlen(s1); data/nasm-2.15.05/asm/labels.c:668: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). size_t l2 = strlen(s2); data/nasm-2.15.05/asm/labels.c:669: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). size_t l3 = strlen(s3)+1; /* Include final NUL */ data/nasm-2.15.05/asm/listing.c:165:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(listdata) + strlen(str) > LIST_HEXBIT) { data/nasm-2.15.05/asm/listing.c:165:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(listdata) + strlen(str) > LIST_HEXBIT) { data/nasm-2.15.05/asm/listing.c:166:9: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(listdata, "-"); data/nasm-2.15.05/asm/nasm.c:399: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(file); data/nasm-2.15.05/asm/nasm.c:482: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(fn); data/nasm-2.15.05/asm/nasm.c:1247: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). plen = strlen(p); data/nasm-2.15.05/asm/nasm.c:1249:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). olen = strlen(tx->label); data/nasm-2.15.05/asm/nasm.c:1383: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). p += strlen(p); data/nasm-2.15.05/asm/nasm.c:1417:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((int) strlen(p) > prevargsize - 10) { data/nasm-2.15.05/asm/nasm.c:1421:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(prevarg, p, prevargsize); data/nasm-2.15.05/asm/nasm.c:2318:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int prev_len = strlen(prev); data/nasm-2.15.05/asm/preproc-nop.c:91: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). p += strlen(p); data/nasm-2.15.05/asm/preproc-nop.c:117:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *nm = nasm_malloc(strlen(buffer)); data/nasm-2.15.05/asm/preproc.c:916: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). len = strlen(p); data/nasm-2.15.05/asm/preproc.c:1199: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 l = strlen(str) + 1; data/nasm-2.15.05/asm/preproc.c:1316:13: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc(f); data/nasm-2.15.05/asm/preproc.c:1328:20: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). next = fgetc(f); data/nasm-2.15.05/asm/preproc.c:1351:20: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). next = fgetc(f); data/nasm-2.15.05/asm/preproc.c:2813: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). namelen = strlen(m->name); data/nasm-2.15.05/asm/preproc.c:5611: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). size_t mlen = strlen(m->name); data/nasm-2.15.05/asm/preproc.c:6204: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). namelen = strlen(m->iname); data/nasm-2.15.05/asm/preproc.c:7109:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return make_tok_qstr_len(next, str, strlen(str)); data/nasm-2.15.05/asm/quote.c:274:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen(str); data/nasm-2.15.05/disasm/disasm.c:1692:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(output, segover, 2); data/nasm-2.15.05/misc/xcrcgen.c:24:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rv = read(fd, &buf, 1); data/nasm-2.15.05/nasmlib/alloc.c:114: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). const size_t size = strlen(s) + 1; data/nasm-2.15.05/nasmlib/alloc.c:135: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). const size_t l1 = strlen(one); data/nasm-2.15.05/nasmlib/alloc.c:136: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). const size_t s2 = strlen(two) + 1; data/nasm-2.15.05/nasmlib/alloc.c:172: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). *lp++ = l = strlen(p); data/nasm-2.15.05/nasmlib/filename.c:51:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t elen = strlen(extension); data/nasm-2.15.05/nasmlib/hashtbl.c:113:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return hash_findb(head, key, strlen(key)+1, insert); data/nasm-2.15.05/nasmlib/hashtbl.c:157:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return hash_findib(head, key, strlen(key)+1, insert); data/nasm-2.15.05/nasmlib/path.c:108:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). const char *p = path + strlen(path); data/nasm-2.15.05/nasmlib/path.c:165: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). size_t dl = strlen(dir); data/nasm-2.15.05/nasmlib/path.c:166: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). size_t fl = strlen(file); data/nasm-2.15.05/nasmlib/realpath.c:103:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). rp = nasm_realloc(rp, strlen(rp) + 1); data/nasm-2.15.05/nasmlib/saa.c:158:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t bytes = strlen(str) + 1; data/nasm-2.15.05/nasmlib/strlist.c:84:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size = strlen(str) + 1; data/nasm-2.15.05/nasmlib/strlist.c:201:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t seplen = strlen(sep); data/nasm-2.15.05/nasmlib/ver.c:68:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return strlen(nasm_comment()); data/nasm-2.15.05/nasmlib/ver.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). return strlen(nasm_signature()); data/nasm-2.15.05/output/codeview.c:242:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). cv8_state.symbol_lengths += strlen(sym->name) + 1; data/nasm-2.15.05/output/codeview.c:314:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). cv8_state.outfile.namebytes = strlen(cv8_state.outfile.name) + 1; data/nasm-2.15.05/output/codeview.c:404: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). file->fullnamelen = strlen(fullpath); data/nasm-2.15.05/output/codeview.c:631:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). creator_len = 2 + 4 + 2 + 3*2 + 3*2 + strlen(creator_str)+1 + 2; data/nasm-2.15.05/output/codeview.c:663:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). section_wbytes(sect, creator_str, strlen(creator_str)+1); /* verSt */ data/nasm-2.15.05/output/codeview.c:684:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). field_len = 12 + strlen(sym->name) + 1; data/nasm-2.15.05/output/codeview.c:699: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). field_len = 9 + strlen(sym->name) + 1; data/nasm-2.15.05/output/codeview.c:713:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). section_wbytes(sect, sym->name, strlen(sym->name) + 1); data/nasm-2.15.05/output/codeview.c:736:46: [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). creator_length = 2 + 4 + 2 + 3*2 + 3*2 + strlen(creator_str)+1 + 2; data/nasm-2.15.05/output/outaout.c:311:42: [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). saa_wbytes(strs, name, (int32_t)(1 + strlen(name))); data/nasm-2.15.05/output/outaout.c:312: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). strslen += 1 + strlen(name); data/nasm-2.15.05/output/outas86.c:182:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t length = strlen(name); data/nasm-2.15.05/output/outbin.c:609:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(s->name) < 65) data/nasm-2.15.05/output/outbin.c:610: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). for (h = 65 - strlen(s->name); h; h--) data/nasm-2.15.05/output/outbin.c:666:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for (h = 65 - strlen(s->name); h; h--) data/nasm-2.15.05/output/outbin.c:1185: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). base_len = strlen(sec->name) + 8; data/nasm-2.15.05/output/outcoff.c:265: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). namelen = strlen(name); data/nasm-2.15.05/output/outcoff.c:276:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(s->name, name, namelen); data/nasm-2.15.05/output/outcoff.c:330:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(name) > 8) { data/nasm-2.15.05/output/outcoff.c:453:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(name) > 8) { data/nasm-2.15.05/output/outcoff.c:454: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). size_t nlen = strlen(name)+1; data/nasm-2.15.05/output/outcoff.c:463: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). sym->namlen = strlen(name); data/nasm-2.15.05/output/outcoff.c:698: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). newS->len = strlen(name); data/nasm-2.15.05/output/outcoff.c:983:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(padname, name, 8); data/nasm-2.15.05/output/outcoff.c:1058:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(padname, name, 8); data/nasm-2.15.05/output/outcoff.c:1082:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(filename, inname, 18); data/nasm-2.15.05/output/outelf.c:394: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). l = strlen(opt); data/nasm-2.15.05/output/outelf.c:564:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). saa_wbytes(strs, elf_module, strlen(elf_module)+1); data/nasm-2.15.05/output/outelf.c:565: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). strslen = 2 + strlen(elf_module); data/nasm-2.15.05/output/outelf.c:641: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). int l1 = strlen(firsthalf); data/nasm-2.15.05/output/outelf.c:642: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). int l2 = strlen(secondhalf); data/nasm-2.15.05/output/outelf.c:824:42: [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). saa_wbytes(strs, name, (int32_t)(1 + strlen(name))); data/nasm-2.15.05/output/outelf.c:825: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). strslen += 1 + strlen(name); data/nasm-2.15.05/output/outelf.c:1968: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). p += strlen(p) + 1; data/nasm-2.15.05/output/outelf.c:1982: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). p += strlen(p) + 1; data/nasm-2.15.05/output/outelf.c:1986: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). p += strlen(p) + 1; data/nasm-2.15.05/output/outelf.c:1993: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). p += strlen(p) + 1; data/nasm-2.15.05/output/outelf.c:2004: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). p += strlen(p) + 1; data/nasm-2.15.05/output/outelf.c:2010: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). p += strlen(p) + 1; data/nasm-2.15.05/output/outelf.c:2014: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). p += strlen(p) + 1; data/nasm-2.15.05/output/outelf.c:2018: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). p += strlen(p) + 1; data/nasm-2.15.05/output/outelf.c:2024: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). p += strlen(p) + 1; data/nasm-2.15.05/output/outelf.c:2028: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). p += strlen(p) + 1; data/nasm-2.15.05/output/outelf.c:2032: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). p += strlen(p) + 1; data/nasm-2.15.05/output/outelf.c:2038: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). p += strlen(p) + 1; data/nasm-2.15.05/output/outelf.c:2042: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). p += strlen(p) + 1; data/nasm-2.15.05/output/outelf.c:2046: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). p += strlen(p) + 1; data/nasm-2.15.05/output/outelf.c:2052: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). p += strlen(p) + 1; data/nasm-2.15.05/output/outelf.c:2058: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). p += strlen(p) + 1; data/nasm-2.15.05/output/outelf.c:2063: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). p += strlen(p) + 1 data/nasm-2.15.05/output/outelf.c:2070: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). p += strlen(p) + 1; data/nasm-2.15.05/output/outelf.c:2080: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). p += strlen(p) + 1; data/nasm-2.15.05/output/outelf.c:2695:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). stabs_filename = nasm_malloc(strlen(filename) + 1); data/nasm-2.15.05/output/outelf.c:2705:42: [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). stabs_filename = nasm_malloc(strlen(filename) + 1); data/nasm-2.15.05/output/outelf.c:2777: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). strsize += strlen(allfiles[i]) + 1; data/nasm-2.15.05/output/outelf.c:3292:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). saa_wbytes(pinfo, elf_module, strlen(elf_module)+1); data/nasm-2.15.05/output/outelf.c:3331:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). saa_wbytes(pinfo, elf_module, strlen(elf_module)+1); data/nasm-2.15.05/output/outelf.c:3371:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). saa_wbytes(pinfo, elf_module, strlen(elf_module)+1); data/nasm-2.15.05/output/outelf.c:3456:57: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). saa_wbytes(plines, ftentry->filename, (int32_t)(strlen(ftentry->filename) + 1)); data/nasm-2.15.05/output/outelf.c:3597:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). dwarf_clist->filename = nasm_malloc(strlen(fname) + 1); data/nasm-2.15.05/output/outieee.c:742: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). p += strlen(p); data/nasm-2.15.05/output/outieee.c:885: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). ieee_putascii("MBFNASM,%02X%s.\n", strlen(ieee_infile), ieee_infile); data/nasm-2.15.05/output/outieee.c:908:42: [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). ieee_putascii("C0105,%02X%s.\n", strlen(fn->name), fn->name); data/nasm-2.15.05/output/outieee.c:942: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). strlen(buf), buf); data/nasm-2.15.05/output/outieee.c:947: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). strlen(buf), buf); data/nasm-2.15.05/output/outieee.c:977:48: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ieee_putascii("NI%X,%02X%s.\n", i, strlen(buf), buf); data/nasm-2.15.05/output/outieee.c:998: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). ieee_putascii("NI%X,%02X%s.\n", i, strlen(buf), buf); data/nasm-2.15.05/output/outieee.c:1022:46: [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). ieee_putascii("NX%X,%02X%s.\n", i++, strlen(buf), buf); data/nasm-2.15.05/output/outieee.c:1049:48: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ieee_putascii("NN%X,%02X%s.\n", i, strlen(buf), buf); data/nasm-2.15.05/output/outieee.c:1344: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). fn->name = nasm_malloc(strlen(lnfname) + 1); data/nasm-2.15.05/output/outmacho.c:224:30: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). #define xstrncpy(xdst, xsrc) strncpy(xdst, xsrc, sizeof(xdst)) data/nasm-2.15.05/output/outmacho.c:822: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). len = strlen(segment); data/nasm-2.15.05/output/outmacho.c:829: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). len = strlen(section); data/nasm-2.15.05/output/outmacho.c:1173:45: [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). saa_wbytes (strs, sym->name, (int32_t)(strlen(sym->name) + 1)); data/nasm-2.15.05/output/outmacho.c:1174: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). *strtabsize += strlen(sym->name) + 1; data/nasm-2.15.05/output/outmacho.c:1199:45: [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). saa_wbytes (strs, sym->name, (int32_t)(strlen (sym->name) + 1)); data/nasm-2.15.05/output/outmacho.c:1200: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). *strtabsize += strlen(sym->name) + 1; data/nasm-2.15.05/output/outobj.c:424: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(name); data/nasm-2.15.05/output/outobj.c:1425: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). p += strlen(p); data/nasm-2.15.05/output/outobj.c:2527: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). fn->name = nasm_malloc(strlen(lnfname) + 1); data/nasm-2.15.05/output/outrdf2.c:283:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). saa_wbytes(header, r->label, strlen(r->label) + 1); data/nasm-2.15.05/output/outrdf2.c:299:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). saa_wbytes(header, r->label, strlen(r->label) + 1); data/nasm-2.15.05/output/outrdf2.c:338:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). saa_wbytes(header, r->label, strlen(r->label) + 1); data/nasm-2.15.05/output/outrdf2.c:349:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). saa_wbytes(header, r->libname, strlen(r->libname) + 1); data/nasm-2.15.05/output/outrdf2.c:360:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). saa_wbytes(header, r->modname, strlen(r->modname) + 1); data/nasm-2.15.05/output/outrdf2.c:379:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((len = strlen(name)) >= EXIM_LABEL_MAX) { data/nasm-2.15.05/output/outrdf2.c:708:6: [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). n = strlen(value); data/nasm-2.15.05/output/outrdf2.c:723: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 ((n = strlen(value)) >= MODLIB_NAME_MAX) { data/nasm-2.15.05/rdoff/ldrdf.c:764:6: [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). n = strlen(modname_specified); data/nasm-2.15.05/rdoff/rdflib.c:115:13: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). t = fgetc(fp); data/nasm-2.15.05/rdoff/rdflib.c:137:13: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). t = fgetc(fp); data/nasm-2.15.05/rdoff/rdflib.c:181:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nasm_write(sig_modname, strlen(sig_modname) + 1, fp); data/nasm-2.15.05/rdoff/rdflib.c:182:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nasm_write(rdl_signature, strlen(rdl_signature), fp); data/nasm-2.15.05/rdoff/rdflib.c:218:17: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). i = fgetc(fp2); data/nasm-2.15.05/rdoff/rdflib.c:250:36: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((*(p++) = (char)fgetc(fp))) data/nasm-2.15.05/rdoff/rdflib.c:368:36: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((*(p++) = (char)fgetc(fptmp))) data/nasm-2.15.05/rdoff/rdflib.c:384:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nasm_write(buf, strlen(buf) + 1, fp); /* module name */ data/nasm-2.15.05/rdoff/rdflib.c:403:21: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). i = fgetc(fp2); data/nasm-2.15.05/rdoff/rdflib.c:417:17: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). i = fgetc(fptmp); data/nasm-2.15.05/rdoff/rdfload.c:197:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). e.name = nasm_malloc(strlen(r->e.label) + 1); data/nasm-2.15.05/rdoff/rdlar.c:148:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). hdr->hdrsize += (n = strlen(modname) + 1); data/nasm-2.15.05/rdoff/rdlar.c:164:13: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). t = fgetc(fp); data/nasm-2.15.05/rdoff/rdlar.c:186:13: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). t = fgetc(fp); data/nasm-2.15.05/rdoff/rdlar.c:212:16: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). hdr.mode = umask(022); data/nasm-2.15.05/rdoff/rdlar.c:256:13: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). i = fgetc(modfp); data/nasm-2.15.05/rdoff/rdlar.c:290:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for (i = 1; i < strlen(argv[1]); i++) { data/nasm-2.15.05/rdoff/rdlar.c:475:22: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((i = fgetc(tmpfp)) == EOF) data/nasm-2.15.05/rdoff/rdlib.c:154: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). i = strlen(lib->name); data/nasm-2.15.05/rdoff/rdlib.c:231: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). i = strlen(buf); data/nasm-2.15.05/rdoff/rdoff.c:567:42: [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). membufwrite(h->buf, &r->i.label, strlen(r->i.label) + 1); data/nasm-2.15.05/rdoff/rdoff.c:574:42: [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). membufwrite(h->buf, &r->e.label, strlen(r->e.label) + 1); data/nasm-2.15.05/rdoff/rdoff.c:578: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). membufwrite(h->buf, &r->d.libname, strlen(r->d.libname) + 1); data/nasm-2.15.05/rdoff/rdoff.c:586: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). membufwrite(h->buf, &r->m.modname, strlen(r->m.modname) + 1); data/nasm-2.15.05/rdoff/rdoff.c:611: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). nasm_write(RDOFFId, strlen(RDOFFId), fp); ANALYSIS SUMMARY: Hits = 464 Lines analyzed = 127610 in approximately 3.92 seconds (32537 lines/second) Physical Source Lines of Code (SLOC) = 104746 Hits@level = [0] 468 [1] 160 [2] 243 [3] 4 [4] 57 [5] 0 Hits@level+ = [0+] 932 [1+] 464 [2+] 304 [3+] 61 [4+] 57 [5+] 0 Hits/KSLOC@level+ = [0+] 8.89771 [1+] 4.42976 [2+] 2.90226 [3+] 0.582361 [4+] 0.544174 [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.