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/ghdl-0.37+dfsg/dist/gcc/lang-specs.h Examining data/ghdl-0.37+dfsg/dist/gcc/lang-options.h Examining data/ghdl-0.37+dfsg/src/synth/ghdlsynth_gates.h Examining data/ghdl-0.37+dfsg/src/synth/ghdlsynth.h Examining data/ghdl-0.37+dfsg/src/grt/ghwlib.c Examining data/ghdl-0.37+dfsg/src/grt/config/win32.c Examining data/ghdl-0.37+dfsg/src/grt/config/math.c Examining data/ghdl-0.37+dfsg/src/grt/config/times.c Examining data/ghdl-0.37+dfsg/src/grt/config/grt_itf.h Examining data/ghdl-0.37+dfsg/src/grt/config/clock.c Examining data/ghdl-0.37+dfsg/src/grt/config/jumps.c Examining data/ghdl-0.37+dfsg/src/grt/fst/fastlz.h Examining data/ghdl-0.37+dfsg/src/grt/fst/config.h Examining data/ghdl-0.37+dfsg/src/grt/fst/lz4.h Examining data/ghdl-0.37+dfsg/src/grt/fst/fastlz.c Examining data/ghdl-0.37+dfsg/src/grt/fst/lz4.c Examining data/ghdl-0.37+dfsg/src/grt/fst/fstapi.h Examining data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c Examining data/ghdl-0.37+dfsg/src/grt/grt-cdynload.c Examining data/ghdl-0.37+dfsg/src/grt/grt-cvpi.c Examining data/ghdl-0.37+dfsg/src/grt/grt-cgnatrts.c Examining data/ghdl-0.37+dfsg/src/grt/vpi_thunk.h Examining data/ghdl-0.37+dfsg/src/grt/vpi_user.h Examining data/ghdl-0.37+dfsg/src/grt/ghwdump.c Examining data/ghdl-0.37+dfsg/src/grt/ghwlib.h Examining data/ghdl-0.37+dfsg/src/grt/vpi_thunk.c Examining data/ghdl-0.37+dfsg/src/grt/grt-cstdio.c Examining data/ghdl-0.37+dfsg/src/grt/grt-cdynload.h Examining data/ghdl-0.37+dfsg/src/ortho/llvm-nodebug/llvm-cbindings.cpp Examining data/ghdl-0.37+dfsg/src/ortho/llvm35/llvm-cbindings.cpp Examining data/ghdl-0.37+dfsg/src/ortho/llvm4-nodebug/llvm-cbindings.cpp Examining data/ghdl-0.37+dfsg/src/ortho/oread/tests/run_declare3.c Examining data/ghdl-0.37+dfsg/src/ortho/gcc/ortho-lang-49.c Examining data/ghdl-0.37+dfsg/src/ortho/gcc/ortho-lang-6.c Examining data/ghdl-0.37+dfsg/src/ortho/gcc/ortho-lang-9.c Examining data/ghdl-0.37+dfsg/src/ortho/gcc/ortho-lang-5.c Examining data/ghdl-0.37+dfsg/src/ortho/gcc/ortho-lang-8.c Examining data/ghdl-0.37+dfsg/src/ortho/gcc/ortho-lang-7.c Examining data/ghdl-0.37+dfsg/src/ortho/mcode/memsegs_c.c Examining data/ghdl-0.37+dfsg/testsuite/gna/issue152/ax_wb_pli_c.c Examining data/ghdl-0.37+dfsg/testsuite/gna/issue98/vpi1.c Examining data/ghdl-0.37+dfsg/testsuite/gna/issue531/vpi1.c Examining data/ghdl-0.37+dfsg/testsuite/gna/bug097/getrand.c Examining data/ghdl-0.37+dfsg/testsuite/gna/bug021/sim.c Examining data/ghdl-0.37+dfsg/testsuite/gna/issue797/main.c Examining data/ghdl-0.37+dfsg/testsuite/gna/issue450/vpi2.c FINAL RESULTS: data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:924:1: [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(vbuf, FST_WRITER_STR); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:930:1: [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(dbuf, asctime(localtime(&walltime))); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:2068:17: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fnam, "%s.hier", xc->filename); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:2100:25: [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(hf, xc->filename); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:2163: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(hf, xc->filename); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:2307: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(path2, path); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:3261:17: [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(xc->curr_flat_hier_nam + chl + 1, nam); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:3265:17: [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(xc->curr_flat_hier_nam, nam); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:3627:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fnam, "%s.hier_%d_%p", xc->filename, getpid(), (void *)xc); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:4254:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(hf, "%s.upk_%d_%p", xc->filename, getpid(), (void *)xc); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:4862:58: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. wx_len = sprintf(wx_buf, "$dump%s $end\n", (xc->blackout_activity[cur_blackout++]) ? "on" : "off"); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:5024:82: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. wx_len = sprintf(wx_buf, "r%.16g %s\n", d, vcdid_buf); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:5296:58: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. wx_len = sprintf(wx_buf, "$dump%s $end\n", (xc->blackout_activity[cur_blackout++]) ? "on" : "off"); data/ghdl-0.37+dfsg/src/grt/ghwlib.c:38:15: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. h->stream = popen(p, "r"); data/ghdl-0.37+dfsg/src/grt/ghwlib.c:1542:7: [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 (GHWPRI32, val->i32); data/ghdl-0.37+dfsg/src/grt/ghwlib.c:1545:7: [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 (GHWPRI64, val->i64); data/ghdl-0.37+dfsg/src/grt/ghwlib.c:1590:7: [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, len, GHWPRI32, val->i32); data/ghdl-0.37+dfsg/src/grt/ghwlib.c:1593:7: [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, len, GHWPRI64, val->i64); data/ghdl-0.37+dfsg/src/grt/ghwlib.c:1959:7: [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 (GHWPRI32 " %s " GHWPRI32, data/ghdl-0.37+dfsg/src/grt/ghwlib.c:1964:7: [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 (GHWPRI64 " %s " GHWPRI64, data/ghdl-0.37+dfsg/src/grt/grt-cstdio.c:56:3: [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, len, format, v); data/ghdl-0.37+dfsg/src/grt/grt-cvpi.c:166:10: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. return vprintf (fmt, ap); data/ghdl-0.37+dfsg/src/grt/grt-cvpi.c:176:9: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. res = vprintf (fmt, params); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:201:27: [3] (tmpfile) GetTempFileName: Temporary file race condition in certain cases (e.g., if run as SYSTEM in many versions of Windows) (CWE-377). uRetVal = GetTempFileName(lpTempPathBuffer, TEXT("FSTW"), 0, szTempFileName); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:289:8: [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. return(realpath(path, resolved_path)); data/ghdl-0.37+dfsg/src/grt/ghwdump.c:175:11: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. c = getopt (argc, argv, "thHTsSlvf:"); data/ghdl-0.37+dfsg/src/grt/grt-cdynload.c:6:18: [3] (misc) LoadLibrary: Ensure that the full path to the library is specified, or current directory may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to find library path, if you aren't already. return (void *)LoadLibrary (path); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:173:8: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). return(fopen(nam, mode)); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:185:1: [2] (buffer) TCHAR: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. TCHAR szTempFileName[MAX_PATH]; data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:186:1: [2] (buffer) TCHAR: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. TCHAR lpTempPathBuffer[MAX_PATH]; data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:227:11: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). FILE *f = tmpfile(); /* replace with mkstemp() + fopen(), etc if this is not good enough */ data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:366: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 buf[8]; data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:383: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 buf[sizeof(uint64_t)]; data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:529: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 buf[5]; data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:558: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 buf[5]; data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:588: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 buf[16]; data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:618: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 buf[10]; /* ceil(64/7) = 10 */ data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:665: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 buf[15]; /* ceil(64/7) = 10 + sign byte padded way up */ data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:825:1: [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(pnt, u, sizeof(uint32_t)); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:835:1: [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(pnt, dbuf, siz); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:852:1: [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(pnt, u, sizeof(uint32_t)); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:871:1: [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(pnt, dbuf, siz); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:884: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 vbuf[FST_HDR_SIM_VERSION_SIZE]; data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:885: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 dbuf[FST_HDR_DATE_SIZE]; data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:1025:11: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *f = fopen("/proc/meminfo", "rb"); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:1029: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[257]; data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:1039:44: [2] (integer) atol: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). size_t v = atol(s+10); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:1124: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(hf, nam, flen); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:1125: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(hf + flen, ".hier"); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:1353:41: [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(scratchpnt, pnt, record_len); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:1364:25: [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(xc->curval_mem + vm4ip[0], vchg_mem + offs + 4 + wrlen, vm4ip[1]); /* checkpoint variable */ data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:1419:41: [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(scratchpnt, pnt, vm4ip[1]); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:1790: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(xc2, xc, sizeof(struct fstWriterContext)); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:1793: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(xc2->valpos_mem, xc->valpos_mem, xc->maxhandle * 4 * sizeof(uint32_t)); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:1798: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(xc2->curval_mem, xc->curval_mem, xc->maxvalpos); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:2101:25: [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(hf+flen, ".pak"); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:2102:30: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(hf, "wb"); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:2108: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. char gz_membuf[FST_GZIO_LEN]; data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:2167:17: [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(hf + flen, ".hier"); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:2202: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 s[FST_HDR_DATE_SIZE]; data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:2208: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(s, dat, (len < FST_HDR_DATE_SIZE) ? len : FST_HDR_DATE_SIZE); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:2221: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 s[FST_HDR_SIM_VERSION_SIZE]; data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:2227: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(s, vers, (len < FST_HDR_SIM_VERSION_SIZE) ? len : FST_HDR_SIM_VERSION_SIZE); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:2260: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 buf[11]; /* ceil(64/7) = 10 + null term */ data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:2399:18: [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 tv = atoi(s); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:2776:41: [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(old_value, buf, len); /* overlay new value */ data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:2778:41: [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(xc->curval_mem + offs, buf, len); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:2802:33: [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(xc->curval_mem + offs, buf, len); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:2840:25: [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(xc->curval_mem + offs, buf, len); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:3052: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 version[FST_HDR_SIM_VERSION_SIZE + 1]; data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:3053: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 date[FST_HDR_DATE_SIZE + 1]; data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:3096: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 str_scope_nam[FST_ID_NAM_SIZ+1]; data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:3097: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 str_scope_comp[FST_ID_NAM_SIZ+1]; data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:3106: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 writex_buf[FST_WRITEX_MAX]; data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:3145: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(xc->writex_buf + xc->writex_pos, s, len); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:3662:18: [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). xc->fh = fopen(fnam, "w+b"); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:3972: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 time_dimension[2] = {0, 0}; data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:4061:39: [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. if(!str[0]) { strcpy(str, "\"\""); } data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:4172:41: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 vcdid_buf[16]; data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:4188:41: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 vcdid_buf[16]; data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:4241: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 gz_membuf[FST_GZIO_LEN]; data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:4255: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). fcomp = fopen(hf, "w+b"); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:4361:58: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 rvs_buf[8]; data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:4555:21: [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((!nam)||(!(xc->f=fopen(nam, "rb")))) data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:4570: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(hf, nam, flen); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:4571: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(hf + flen, ".hier"); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:4572:18: [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). xc->fh = fopen(hf, "rb"); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:4850: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. char wx_buf[32]; data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:4855:50: [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. wx_len = sprintf(wx_buf, "#%"PRIu64"\n", beg_tim); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:4913:73: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 vcd_id[16]; data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:4933:65: [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(xc->temp_signal_value_buf, mu+sig_offs, xc->signal_lens[idx]); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:4941:73: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 vcd_id[16]; data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:4985:81: [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(clone_d, srcdata, 8); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:4996:73: [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((char *)xc->temp_signal_value_buf, "%.16g", d); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:5004:73: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 vcdid_buf[16]; data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:5005:73: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 wx_buf[64]; data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:5011:81: [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(clone_d, srcdata, 8); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:5276:25: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 wx_buf[32]; data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:5289:42: [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. wx_len = sprintf(wx_buf, "#%"PRIu64"\n", time_table[i]); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:5335:57: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 vcd_id[16]; data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:5381:65: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 vcd_id[16]; data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:5466:57: [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(xc->temp_signal_value_buf, vdata, len); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:5486:50: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 buf[8]; data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:5535:65: [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(clone_d, srcdata, 8); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:5546:57: [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((char *)xc->temp_signal_value_buf, "%.16g", d); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:5554:57: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 wx_buf[32]; data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:5560:65: [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(clone_d, srcdata, 8); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:5572:66: [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. wx_len = sprintf(wx_buf, "r%.16g", d); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:5580:41: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 vcd_id[16]; data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:5655: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(buf, xc->rvat_frame_data + xc->rvat_sig_offs[facidx], xc->signal_lens[facidx]); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:5666:25: [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(clone_d, srcdata, 8); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:5678:17: [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((char *)buf, "%.16g", d); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:6224:33: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, vdata, xc->signal_lens[facidx]); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:6233:34: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 bufd[8]; data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:6258:33: [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(clone_d, srcdata, 8); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:6270:25: [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%.16g", d); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:6417: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 mem[1]; data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:6454:1: [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(chain->mem, mem, length); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:6548: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 val[3]; data/ghdl-0.37+dfsg/src/grt/fst/lz4.c:148: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(&val16, memPtr, 2); data/ghdl-0.37+dfsg/src/grt/fst/lz4.c:169: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(memPtr, &value, 2); data/ghdl-0.37+dfsg/src/grt/fst/lz4.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(&val32, memPtr, 4); data/ghdl-0.37+dfsg/src/grt/fst/lz4.c:189: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(&val64, memPtr, 8); data/ghdl-0.37+dfsg/src/grt/fst/lz4.c:202:59: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. static void LZ4_copy4(void* dstPtr, const void* srcPtr) { memcpy(dstPtr, srcPtr, 4); } data/ghdl-0.37+dfsg/src/grt/fst/lz4.c:204:59: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. static void LZ4_copy8(void* dstPtr, const void* srcPtr) { memcpy(dstPtr, srcPtr, 8); } data/ghdl-0.37+dfsg/src/grt/fst/lz4.c:648: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(op, anchor, lastRun); data/ghdl-0.37+dfsg/src/grt/fst/lz4.c:884: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(op, anchor, lastRunSize); data/ghdl-0.37+dfsg/src/grt/fst/lz4.c:1186: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(op, ip, length); data/ghdl-0.37+dfsg/src/grt/fst/lz4.c:1228: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(op, dictEnd - copySize, copySize); data/ghdl-0.37+dfsg/src/grt/fst/lz4.c:1239: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(op, lowPrefix, copySize); data/ghdl-0.37+dfsg/src/grt/ghwlib.c:52:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char hdr[16]; data/ghdl-0.37+dfsg/src/grt/ghwlib.c:54: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). h->stream = fopen (filename, "rb"); data/ghdl-0.37+dfsg/src/grt/ghwlib.c:101:22: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. union { unsigned char b[4]; uint32_t i;} v; data/ghdl-0.37+dfsg/src/grt/ghwlib.c:359:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char hdr[12]; data/ghdl-0.37+dfsg/src/grt/ghwlib.c:606:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char hdr[8]; data/ghdl-0.37+dfsg/src/grt/ghwlib.c:832:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char hdr[4]; data/ghdl-0.37+dfsg/src/grt/ghwlib.c:1005:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char hdr[16]; data/ghdl-0.37+dfsg/src/grt/ghwlib.c:1361:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char hdr[4]; data/ghdl-0.37+dfsg/src/grt/ghwlib.c:1401:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char hdr[12]; data/ghdl-0.37+dfsg/src/grt/ghwlib.c:1439:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char hdr[8]; data/ghdl-0.37+dfsg/src/grt/ghwlib.c:1505:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char hdr[4]; data/ghdl-0.37+dfsg/src/grt/ghwlib.c:1664:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char hdr[8]; data/ghdl-0.37+dfsg/src/grt/ghwlib.c:1678:16: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char ent[8]; data/ghdl-0.37+dfsg/src/grt/ghwlib.c:1699:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char hdr[8]; data/ghdl-0.37+dfsg/src/grt/ghwlib.c:1715:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char hdr[4]; data/ghdl-0.37+dfsg/src/grt/ghwlib.c:1847:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char hdr[4]; data/ghdl-0.37+dfsg/src/grt/ghwlib.c:1904:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char hdr[4]; data/ghdl-0.37+dfsg/src/grt/ghwlib.h:418:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char name[4]; data/ghdl-0.37+dfsg/src/grt/grt-cdynload.c:18:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char msg[256]; data/ghdl-0.37+dfsg/src/ortho/gcc/ortho-lang-49.c:462:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (nopt, opt, len1); data/ghdl-0.37+dfsg/src/ortho/gcc/ortho-lang-49.c:463:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (nopt + len1, arg, len2); data/ghdl-0.37+dfsg/src/ortho/gcc/ortho-lang-5.c:449:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (nopt, opt, len1); data/ghdl-0.37+dfsg/src/ortho/gcc/ortho-lang-5.c:450:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (nopt + len1, arg, len2); data/ghdl-0.37+dfsg/src/ortho/gcc/ortho-lang-6.c:449:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (nopt, opt, len1); data/ghdl-0.37+dfsg/src/ortho/gcc/ortho-lang-6.c:450:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (nopt + len1, arg, len2); data/ghdl-0.37+dfsg/src/ortho/gcc/ortho-lang-7.c:449:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (nopt, opt, len1); data/ghdl-0.37+dfsg/src/ortho/gcc/ortho-lang-7.c:450:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (nopt + len1, arg, len2); data/ghdl-0.37+dfsg/src/ortho/gcc/ortho-lang-8.c:449:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (nopt, opt, len1); data/ghdl-0.37+dfsg/src/ortho/gcc/ortho-lang-8.c:450:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (nopt + len1, arg, len2); data/ghdl-0.37+dfsg/src/ortho/gcc/ortho-lang-9.c:449:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (nopt, opt, len1); data/ghdl-0.37+dfsg/src/ortho/gcc/ortho-lang-9.c:450:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (nopt + len1, arg, len2); data/ghdl-0.37+dfsg/src/ortho/mcode/memsegs_c.c:64:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (res, ptr, old_size); data/ghdl-0.37+dfsg/src/ortho/mcode/memsegs_c.c:111:7: [2] (buffer) CopyMemory: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. CopyMemory (res, ptr, size > old_size ? old_size : size); data/ghdl-0.37+dfsg/testsuite/gna/issue531/vpi1.c:80:46: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. *nets[i].handle = vpi_handle_by_name ((char *)nets[i].name, NULL); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:326:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(__fd, pnt + i, ((__len - i) >= SSIZE_MAX) ? SSIZE_MAX : (__len - i)); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:536:14: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ch = fgetc(f); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:565:14: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ch = fgetc(f); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:595:14: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ch = fgetc(f); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:1121: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). int flen = strlen(nam); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:1982:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *fnam = malloc(strlen(xc->filename) + 5 + 1); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:2097: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). int flen = strlen(xc->filename); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:2161: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). int flen = strlen(xc->filename); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:2204: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). int len = strlen(dat); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:2223: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). int len = strlen(vers); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:2299: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). int slen = strlen(path); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:2553: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). nlen = strlen(nam); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:2653: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). xc->hier_file_len += strlen(scopename); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:2657: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). xc->hier_file_len += strlen(scopecomp); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:2705: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). xc->hier_file_len += strlen(attrname); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:3252: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). int len = chl + 1 + strlen(nam); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:3608: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). char *fnam = malloc(strlen(xc->filename) + 6 + 16 + 32 + 1); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:3811:19: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int tag = fgetc(xc->fh); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:3816:48: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). xc->hier.u.scope.typ = fgetc(xc->fh); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:3818:37: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while((ch = fgetc(xc->fh))) data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:3826:37: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while((ch = fgetc(xc->fh))) data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:3840:47: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). xc->hier.u.attr.typ = fgetc(xc->fh); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:3841:51: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). xc->hier.u.attr.subtype = fgetc(xc->fh); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:3843:37: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while((ch = fgetc(xc->fh))) data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:3901:52: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). xc->hier.u.var.direction = fgetc(xc->fh); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:3903:37: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while((ch = fgetc(xc->fh))) data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:4030:19: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int tag = fgetc(xc->fh); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:4034:37: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). scopetype = fgetc(xc->fh); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:4037:37: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while((ch = fgetc(xc->fh))) data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:4042:31: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while(fgetc(xc->fh)) { }; /* scopecomp */ data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:4052:36: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). attrtype = fgetc(xc->fh); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:4053:35: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). subtype = fgetc(xc->fh); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:4055:37: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while((ch = fgetc(xc->fh))) data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:4138:40: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). /* vardir = */ fgetc(xc->fh); /* unused in VCD reader, but need to advance read pointer */ data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:4140:37: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while((ch = fgetc(xc->fh))) data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:4236:11: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). sectype = fgetc(xc->f); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:4244: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). int flen = strlen(xc->filename); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:4325:27: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). sectype = fgetc(xc->f); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:4386:38: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ch = fgetc(xc->f); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:4392:38: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ch = fgetc(xc->f); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:4514:60: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). xc->blackout_activity[i] = fgetc(xc->f) != 0; data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:4562: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). int flen = strlen(nam); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:4723:19: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). sectype = fgetc(xc->f); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:5044:20: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). packtype = fgetc(xc->f); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:5740:19: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). sectype = fgetc(xc->f); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:5765:35: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). sectype = fgetc(xc->f); data/ghdl-0.37+dfsg/src/grt/fst/fstapi.c:5890:21: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). xc->rvat_packtype = fgetc(xc->f); data/ghdl-0.37+dfsg/src/grt/ghwlib.c:33: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 plen = strlen (decomp) + 1 + strlen(filename) + 1; data/ghdl-0.37+dfsg/src/grt/ghwlib.c:33: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). int plen = strlen (decomp) + 1 + strlen(filename) + 1; data/ghdl-0.37+dfsg/src/grt/ghwlib.c:160:7: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). v = fgetc (h->stream); data/ghdl-0.37+dfsg/src/grt/ghwlib.c:175:15: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int v = fgetc (h->stream); data/ghdl-0.37+dfsg/src/grt/ghwlib.c:195:15: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int v = fgetc (h->stream); data/ghdl-0.37+dfsg/src/grt/ghwlib.c:220:15: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int v = fgetc (h->stream); data/ghdl-0.37+dfsg/src/grt/ghwlib.c:268:11: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int t = fgetc (h->stream); data/ghdl-0.37+dfsg/src/grt/ghwlib.c:398:8: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc (h->stream); data/ghdl-0.37+dfsg/src/grt/ghwlib.c:415:8: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc (h->stream); data/ghdl-0.37+dfsg/src/grt/ghwlib.c:622:11: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). t = fgetc (h->stream); data/ghdl-0.37+dfsg/src/grt/ghwlib.c:824:7: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (fgetc (h->stream) != 0) data/ghdl-0.37+dfsg/src/grt/ghwlib.c:845:11: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). t = fgetc (h->stream); data/ghdl-0.37+dfsg/src/grt/ghwlib.c:955:6: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). v = fgetc (h->stream); data/ghdl-0.37+dfsg/src/grt/ghwlib.c:964:6: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). v = fgetc (h->stream); data/ghdl-0.37+dfsg/src/grt/ghwlib.c:1049:11: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). t = fgetc (h->stream); data/ghdl-0.37+dfsg/src/grt/ghwlib.c:1570:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (buf, base->en.lits[val->b2], len - 1); data/ghdl-0.37+dfsg/src/grt/ghwlib.c:1581:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (buf, base->en.lits[val->e8], len - 1); data/ghdl-0.37+dfsg/src/grt/grt-cstdio.c:49: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). return strlen (buf); data/ghdl-0.37+dfsg/src/grt/grt-cstdio.c:75:10: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return getc (stream); data/ghdl-0.37+dfsg/src/ortho/gcc/ortho-lang-49.c:459: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). len1 = strlen (opt); data/ghdl-0.37+dfsg/src/ortho/gcc/ortho-lang-49.c:460: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). len2 = strlen (arg); data/ghdl-0.37+dfsg/src/ortho/gcc/ortho-lang-5.c:446: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). len1 = strlen (opt); data/ghdl-0.37+dfsg/src/ortho/gcc/ortho-lang-5.c:447: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). len2 = strlen (arg); data/ghdl-0.37+dfsg/src/ortho/gcc/ortho-lang-6.c:446: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). len1 = strlen (opt); data/ghdl-0.37+dfsg/src/ortho/gcc/ortho-lang-6.c:447: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). len2 = strlen (arg); data/ghdl-0.37+dfsg/src/ortho/gcc/ortho-lang-7.c:446: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). len1 = strlen (opt); data/ghdl-0.37+dfsg/src/ortho/gcc/ortho-lang-7.c:447: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). len2 = strlen (arg); data/ghdl-0.37+dfsg/src/ortho/gcc/ortho-lang-8.c:446: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). len1 = strlen (opt); data/ghdl-0.37+dfsg/src/ortho/gcc/ortho-lang-8.c:447: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). len2 = strlen (arg); data/ghdl-0.37+dfsg/src/ortho/gcc/ortho-lang-9.c:446: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). len1 = strlen (opt); data/ghdl-0.37+dfsg/src/ortho/gcc/ortho-lang-9.c:447: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). len2 = strlen (arg); ANALYSIS SUMMARY: Hits = 242 Lines analyzed = 28720 in approximately 1.37 seconds (21009 lines/second) Physical Source Lines of Code (SLOC) = 21557 Hits@level = [0] 201 [1] 78 [2] 137 [3] 4 [4] 23 [5] 0 Hits@level+ = [0+] 443 [1+] 242 [2+] 164 [3+] 27 [4+] 23 [5+] 0 Hits/KSLOC@level+ = [0+] 20.5502 [1+] 11.2261 [2+] 7.60774 [3+] 1.25249 [4+] 1.06694 [5+] 0 Dot directories skipped = 2 (--followdotdir overrides) Minimum risk level = 1 Not every hit is necessarily a security vulnerability. There may be other security vulnerabilities; review your code! See 'Secure Programming HOWTO' (https://dwheeler.com/secure-programs) for more information.