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/jam-2.6.1/jamgram.h Examining data/jam-2.6.1/pathvms.c Examining data/jam-2.6.1/builtins.c Examining data/jam-2.6.1/lists.c Examining data/jam-2.6.1/hash.c Examining data/jam-2.6.1/jam.c Examining data/jam-2.6.1/option.c Examining data/jam-2.6.1/command.c Examining data/jam-2.6.1/jambase.c Examining data/jam-2.6.1/variable.h Examining data/jam-2.6.1/headers.c Examining data/jam-2.6.1/patchlevel.h Examining data/jam-2.6.1/execmac.c Examining data/jam-2.6.1/builtins.h Examining data/jam-2.6.1/lists.h Examining data/jam-2.6.1/execunix.c Examining data/jam-2.6.1/search.h Examining data/jam-2.6.1/timestamp.h Examining data/jam-2.6.1/jam.h Examining data/jam-2.6.1/fileunix.c Examining data/jam-2.6.1/expand.c Examining data/jam-2.6.1/search.c Examining data/jam-2.6.1/jamgram.c Examining data/jam-2.6.1/make1.c Examining data/jam-2.6.1/jamgramtab.h Examining data/jam-2.6.1/parse.h Examining data/jam-2.6.1/execas400.c Examining data/jam-2.6.1/newstr.h Examining data/jam-2.6.1/mkjambase.c Examining data/jam-2.6.1/pathsys.h Examining data/jam-2.6.1/regexp.h Examining data/jam-2.6.1/execvms.c Examining data/jam-2.6.1/jambase.h Examining data/jam-2.6.1/pathunix.c Examining data/jam-2.6.1/expand.h Examining data/jam-2.6.1/filent.c Examining data/jam-2.6.1/headers.h Examining data/jam-2.6.1/hash.h Examining data/jam-2.6.1/newstr.c Examining data/jam-2.6.1/compile.h Examining data/jam-2.6.1/filemac.c Examining data/jam-2.6.1/variable.c Examining data/jam-2.6.1/fileos2.c Examining data/jam-2.6.1/option.h Examining data/jam-2.6.1/execcmd.h Examining data/jam-2.6.1/rules.c Examining data/jam-2.6.1/make.c Examining data/jam-2.6.1/scan.h Examining data/jam-2.6.1/parse.c Examining data/jam-2.6.1/compile.c Examining data/jam-2.6.1/filevms.c Examining data/jam-2.6.1/command.h Examining data/jam-2.6.1/timestamp.c Examining data/jam-2.6.1/glob.c Examining data/jam-2.6.1/pathmac.c Examining data/jam-2.6.1/filesys.h Examining data/jam-2.6.1/regexp.c Examining data/jam-2.6.1/rules.h Examining data/jam-2.6.1/scan.c Examining data/jam-2.6.1/make.h FINAL RESULTS: data/jam-2.6.1/execas400.c:196:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf( s, "%s \"%s\"", qsh, string ); data/jam-2.6.1/execas400.c:199:11: [4] (shell) system: 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. status = system( s ); data/jam-2.6.1/execunix.c:197:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf( cmdtab[ slot ].tempfile, "%s\\jam%dt%d.bat", data/jam-2.6.1/execunix.c:293:6: [4] (shell) execvp: 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. execvp( argv[0], (char **)argv ); data/jam-2.6.1/execvms.c:152:15: [4] (shell) system: 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. status = system( tempnambuf ) & 0x07; data/jam-2.6.1/execvms.c:161:15: [4] (shell) system: 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. status = system( s ) & 0x07; data/jam-2.6.1/expand.c:209:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy( varname, vars->string ); data/jam-2.6.1/expand.c:287:4: [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( out, value->string ); data/jam-2.6.1/expand.c:301:4: [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( out, edits.join.ptr ); data/jam-2.6.1/expand.c:323:4: [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( out1, rem->string ); data/jam-2.6.1/filent.c:96:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf( filespec, "%s%c*", dir, PATH_DELIM ); data/jam-2.6.1/filent.c:276:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf( buf, "%s(%.*s)", archive, (int)(endname - name), name ); data/jam-2.6.1/fileos2.c:67:2: [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( filespec, dir ); data/jam-2.6.1/fileunix.c:299:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf( buf, "%s(%s)", archive, lar_name ); data/jam-2.6.1/fileunix.c:385:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf( buf, "%s(%s)", archive, ar_hdr.hdr._ar_name.ar_name ); data/jam-2.6.1/filevms.c:278:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf( buf, "%s(%s.obj)", VMS_archive, filename ); data/jam-2.6.1/jam.c:280:6: [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, ctime( &clock ) ); data/jam-2.6.1/regexp.c:1284:10: [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). (void) strcat(buf, p); data/jam-2.6.1/scan.c:395:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf( buf, "unknown symbol %s", s->string ); data/jam-2.6.1/scan.c:398:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf( buf, "argument %s", s->string ); data/jam-2.6.1/scan.c:401:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf( buf, "string \"%s\"", s->string ); data/jam-2.6.1/scan.c:404:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf( buf, "keyword %s", s->string ); data/jam-2.6.1/variable.c:192:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy( out, l->string ); data/jam-2.6.1/execunix.c:189:23: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if( !( tempdir = getenv( "TEMP" ) ) && data/jam-2.6.1/execunix.c:190:16: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. !( tempdir = getenv( "TMP" ) ) ) data/jam-2.6.1/execvms.c:95:9: [3] (tmpfile) tmpnam: Temporary file race condition (CWE-377). (void)tmpnam( tempnambuf + 1 ); data/jam-2.6.1/jamgram.c:466:16: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if ((yys = getenv("YYDEBUG"))) data/jam-2.6.1/builtins.c:232: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 buf[ MAXJPATH ]; data/jam-2.6.1/builtins.c:306:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[ MAXSYM ]; data/jam-2.6.1/builtins.c:308:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy( buf, re->startp[i], l ); data/jam-2.6.1/compile.c:945: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. static char indent[36] = ">>>>|>>>>|>>>>|>>>>|>>>>|>>>>|>>>>|"; data/jam-2.6.1/execas400.c:75: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 *argv[4] = { 0 }; data/jam-2.6.1/execas400.c:76: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 buf[128]; data/jam-2.6.1/execunix.c:166: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. const char *argv[ MAXARGC + 1 ]; /* +1 for NULL */ data/jam-2.6.1/execunix.c:222: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). f = fopen( cmdtab[ slot ].tempfile, "w" ); data/jam-2.6.1/execunix.c:237: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 jobno[4]; data/jam-2.6.1/execunix.c:240:6: [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( jobno, "%d", slot + 1 ); data/jam-2.6.1/execunix.c:289:13: [2] (race) vfork: On some old systems, vfork() permits race conditions, and it's very difficult to use correctly (CWE-362). Use fork() instead. if ((pid = vfork()) == 0) data/jam-2.6.1/execvms.c:49: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 tempnambuf[ L_tmpnam + 1 + 4 ] = {0}; data/jam-2.6.1/execvms.c:96:3: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat( tempnambuf, ".com" ); data/jam-2.6.1/execvms.c:101:17: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if( !( f = fopen( tempnambuf + 1, "w" ) ) ) data/jam-2.6.1/expand.c:77: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 out_buf[ MAXSYM ]; data/jam-2.6.1/expand.c:202: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 varname[ MAXSYM ]; data/jam-2.6.1/expand.c:228:14: [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). sub1 = atoi( bracket + 1 ) - 1; data/jam-2.6.1/expand.c:235:11: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). sub2 = atoi( dash + 1 ) - sub1; data/jam-2.6.1/filemac.c:64: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 filename[ MAXJPATH ]; data/jam-2.6.1/filemac.c:65: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 fullPath[ 512 ]; data/jam-2.6.1/filent.c:72: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 filespec[ MAXJPATH ]; data/jam-2.6.1/filent.c:73: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 filename[ MAXJPATH ]; data/jam-2.6.1/filent.c:175: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 ar_name[16]; data/jam-2.6.1/filent.c:176: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 ar_date[12]; data/jam-2.6.1/filent.c:177: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 ar_uid[6]; data/jam-2.6.1/filent.c:178: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 ar_gid[6]; data/jam-2.6.1/filent.c:179: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 ar_mode[8]; data/jam-2.6.1/filent.c:180: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 ar_size[10]; data/jam-2.6.1/filent.c:181: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 ar_fmag[2]; data/jam-2.6.1/filent.c:195: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 buf[ MAXJPATH ]; data/jam-2.6.1/filent.c:199:13: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if( ( fd = open( archive, O_RDONLY | O_BINARY, 0 ) ) < 0 ) data/jam-2.6.1/filent.c:248:35: [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). name = endname = string_table + atoi( ar_hdr.ar_name + 1 ); data/jam-2.6.1/fileos2.c: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 filespec[ MAXJPATH ]; data/jam-2.6.1/fileos2.c:51: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 filename[ MAXJPATH ]; data/jam-2.6.1/fileunix.c:77: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 ar_name[16]; /* file member name - `/' terminated */ data/jam-2.6.1/fileunix.c:78: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 ar_date[12]; /* file member date - decimal */ data/jam-2.6.1/fileunix.c:79: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 ar_uid[6]; /* file member user id - decimal */ data/jam-2.6.1/fileunix.c:80: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 ar_gid[6]; /* file member group id - decimal */ data/jam-2.6.1/fileunix.c:81: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 ar_mode[8]; /* file member mode - octal */ data/jam-2.6.1/fileunix.c:82: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 ar_size[10]; /* file member size - decimal */ data/jam-2.6.1/fileunix.c:83: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 ar_fmag[2]; /* ARFMAG - string to end header */ data/jam-2.6.1/fileunix.c:119: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 filename[ MAXJPATH ]; data/jam-2.6.1/fileunix.c: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 buf[ MAXJPATH ]; data/jam-2.6.1/fileunix.c:201:13: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if( ( fd = open( archive, O_RDONLY, 0 ) ) < 0 ) data/jam-2.6.1/fileunix.c:221: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 lar_name[256]; data/jam-2.6.1/fileunix.c:270:30: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). char *src = string_table + atoi( ar_hdr.ar_name + 1 ); data/jam-2.6.1/fileunix.c:286: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 len = atoi( ar_hdr.ar_name + 3 ); data/jam-2.6.1/fileunix.c:331: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 pad[ 256 ]; data/jam-2.6.1/fileunix.c:334: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 buf[ MAXJPATH ]; data/jam-2.6.1/fileunix.c:338:13: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if( ( fd = open( archive, O_RDONLY, 0 ) ) < 0 ) data/jam-2.6.1/filevms.c:113: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 esa[256]; data/jam-2.6.1/filevms.c:114: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[256]; data/jam-2.6.1/filevms.c:115: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 filename2[256]; data/jam-2.6.1/filevms.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 dirname[256]; data/jam-2.6.1/filevms.c:194:6: [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( dirname, "[.%.*s]", xnam.nam$b_name, xnam.nam$l_name ); data/jam-2.6.1/filevms.c:252: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[128]; data/jam-2.6.1/filevms.c:253: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[ MAXJPATH ]; data/jam-2.6.1/glob.c:45: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 bitlist[ BITLISTSIZE ]; data/jam-2.6.1/hash.c:128: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( (char *)&i->data, (char *)*data, hp->items.datalen ); data/jam-2.6.1/headers.c:96: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 buf[ 1024 ]; data/jam-2.6.1/headers.c:98: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). if( !( f = fopen( file, "r" ) ) ) data/jam-2.6.1/headers.c:114: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 buf2[ MAXSYM ]; data/jam-2.6.1/headers.c:116: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( buf2, re[i]->startp[1], l ); data/jam-2.6.1/headers.c:126: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. free( (char *)re[--rec] ); data/jam-2.6.1/jam.c:229:19: [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). globs.jobs = atoi( s ); data/jam-2.6.1/jam.c:238:14: [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( s ); data/jam-2.6.1/jam.c:277: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 buf[ 128 ]; data/jam-2.6.1/jam.c:322: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. const char *symv[2]; data/jam-2.6.1/jam.c:351:28: [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( !( globs.cmdout = fopen( s, "w" ) ) ) data/jam-2.6.1/jam.h:585: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 debug[DEBUG_MAX]; data/jam-2.6.1/jamgram.c:869: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). { yyval.number = atoi( yyvsp[0].string ) * RULE_MAXLINE; } data/jam-2.6.1/mkjambase.c:29: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 buf[ 1024 ]; data/jam-2.6.1/mkjambase.c:41:16: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if( !( fout = fopen( argv[1], "w" ) ) ) data/jam-2.6.1/mkjambase.c:64: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( !( fin = fopen( *argv, "r" ) ) ) data/jam-2.6.1/newstr.c:61: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( m, string, l + 1 ); data/jam-2.6.1/pathmac.c:135: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 grid[5][5] = { data/jam-2.6.1/pathmac.c:186:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy( file, f->f_grist.ptr, f->f_grist.len ); data/jam-2.6.1/pathmac.c:205:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy( file, f->f_dir.ptr, f->f_dir.len ); data/jam-2.6.1/pathmac.c:211: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( file, f->f_root.ptr, f->f_root.len ); data/jam-2.6.1/pathmac.c:217: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( file, f->f_root.ptr, f->f_root.len ); data/jam-2.6.1/pathmac.c:220: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( file, f->f_dir.ptr, f->f_dir.len ); data/jam-2.6.1/pathmac.c:226:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy( file, ":::" ); data/jam-2.6.1/pathmac.c:242:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy( file, f->f_base.ptr, f->f_base.len ); data/jam-2.6.1/pathmac.c:248:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy( file, f->f_suffix.ptr, f->f_suffix.len ); data/jam-2.6.1/pathmac.c:255:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy( file, f->f_member.ptr, f->f_member.len ); data/jam-2.6.1/pathunix.c:146:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy( file, f->f_grist.ptr, f->f_grist.len ); data/jam-2.6.1/pathunix.c:170:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy( file, f->f_root.ptr, f->f_root.len ); data/jam-2.6.1/pathunix.c:177:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy( file, f->f_dir.ptr, f->f_dir.len ); data/jam-2.6.1/pathunix.c:198:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy( file, f->f_base.ptr, f->f_base.len ); data/jam-2.6.1/pathunix.c:204:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy( file, f->f_suffix.ptr, f->f_suffix.len ); data/jam-2.6.1/pathunix.c:211:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy( file, f->f_member.ptr, f->f_member.len ); data/jam-2.6.1/pathvms.c:248:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy( file, f->f_grist.ptr, f->f_grist.len ); data/jam-2.6.1/pathvms.c:264: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( file, f->f_dir.ptr, f->f_dir.len ); data/jam-2.6.1/pathvms.c:270: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( file, f->f_root.ptr, f->f_root.len ); data/jam-2.6.1/pathvms.c:276: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( file, root.dev.ptr, root.dev.len ); data/jam-2.6.1/pathvms.c:278: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( file, dir.dir.ptr, dir.dir.len ); data/jam-2.6.1/pathvms.c:285: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( file, f->f_root.ptr, f->f_root.len ); data/jam-2.6.1/pathvms.c:299: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( file, dir.dir.ptr + 1, dir.dir.len - 1 ); data/jam-2.6.1/pathvms.c:305: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( file, root.dev.ptr, root.dev.len ); data/jam-2.6.1/pathvms.c:309: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( file, dir.dir.ptr + 2, dir.dir.len - 2 ); data/jam-2.6.1/pathvms.c:357:4: [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( file, "[000000]" ); data/jam-2.6.1/pathvms.c:369:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy( file, f->f_base.ptr, f->f_base.len ); data/jam-2.6.1/pathvms.c:379:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy( file, f->f_suffix.ptr, f->f_suffix.len ); data/jam-2.6.1/pathvms.c:390:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy( file, f->f_member.ptr, f->f_member.len ); data/jam-2.6.1/regexp.c:1208: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. static char buf[50]; data/jam-2.6.1/regexp.c:1252:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf+strlen(buf), "OPEN%d", OP(op)-OPEN); data/jam-2.6.1/regexp.c:1264:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf+strlen(buf), "CLOSE%d", OP(op)-CLOSE); data/jam-2.6.1/regexp.h:12: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. const char *startp[NSUBEXP]; data/jam-2.6.1/regexp.h:13: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. const char *endp[NSUBEXP]; data/jam-2.6.1/regexp.h:18: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 program[1]; /* Unwarranted chumminess with compiler. */ data/jam-2.6.1/scan.c:46: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 buf[ 512 ]; /* for yyfparse() -- line buffer */ data/jam-2.6.1/scan.c:160:44: [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( strcmp( i->fname, "-" ) && !( f = fopen( i->fname, "r" ) ) ) data/jam-2.6.1/scan.c:210: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 buf[BIGGEST_TOKEN]; data/jam-2.6.1/scan.c:387: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. static char buf[ BIGGEST_TOKEN + 20 ]; data/jam-2.6.1/scan.c:392:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf( buf, "EOF" ); data/jam-2.6.1/search.c:28: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 buf[ MAXJPATH ]; data/jam-2.6.1/timestamp.c:69: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 buf[ MAXJPATH ]; data/jam-2.6.1/timestamp.c:72: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 path[ MAXJPATH ]; data/jam-2.6.1/timestamp.c:175: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 path[ MAXJPATH ]; data/jam-2.6.1/variable.c:96:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[ MAXSYM ]; data/jam-2.6.1/compile.c:393: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). return var_expand( L0, s, s + strlen( s ), args, 1 ); data/jam-2.6.1/execas400.c:130:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while( ( len = read( pipefds[ 0 ], buf, sizeof( buf ) - 1 ) ) > 0 ) data/jam-2.6.1/execas400.c:195: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). s = malloc( strlen( string ) + strlen( qsh ) + 16 ); data/jam-2.6.1/execas400.c:195: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). s = malloc( strlen( string ) + strlen( qsh ) + 16 ); data/jam-2.6.1/execunix.c:195: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). cmdtab[ slot ].tempfile = malloc( strlen( tempdir ) + 32 ); data/jam-2.6.1/execunix.c:216:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if( p && *p || strlen( string ) > MAXLINE || shell ) data/jam-2.6.1/execvms.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). int len = s ? s + 1 - string : strlen( string ); data/jam-2.6.1/expand.c:300: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). out += strlen( out ); data/jam-2.6.1/expand.c:302: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). out += strlen( out ); data/jam-2.6.1/expand.c:319: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). out1 = out + strlen( out ); data/jam-2.6.1/expand.c:461: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). fp->len = strlen( mods ); data/jam-2.6.1/filemac.c:78: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). f.f_dir.len = strlen(dir); data/jam-2.6.1/filent.c:83: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). f.f_dir.len = strlen(dir); data/jam-2.6.1/filent.c:111: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). f.f_base.len = strlen( finfo->ff_name ); data/jam-2.6.1/filent.c:128: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). f.f_base.len = strlen( finfo->name ); data/jam-2.6.1/filent.c:202:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if( read( fd, buf, SARMAG ) != SARMAG || data/jam-2.6.1/filent.c:214:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while( read( fd, &ar_hdr, SARHDR ) == SARHDR && data/jam-2.6.1/filent.c:236:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, string_table, lar_size) != lar_size) data/jam-2.6.1/fileos2.c:61: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). f.f_dir.len = strlen(dir); data/jam-2.6.1/fileos2.c:74:6: [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( filespec, "/" ); data/jam-2.6.1/fileos2.c:76:2: [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( filespec, "*" ); data/jam-2.6.1/fileos2.c:92: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). f.f_base.len = strlen( finfo->name ); data/jam-2.6.1/fileunix.c:126: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). f.f_dir.len = strlen(dir); data/jam-2.6.1/fileunix.c:151: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). f.f_base.len = strlen( f.f_base.ptr ); data/jam-2.6.1/fileunix.c:204:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if( read( fd, buf, SARMAG ) != SARMAG || data/jam-2.6.1/fileunix.c:216:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while( read( fd, &ar_hdr, SARHDR ) == SARHDR && data/jam-2.6.1/fileunix.c:260:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if( read(fd, string_table, lar_size) != lar_size ) data/jam-2.6.1/fileunix.c:287:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if( read( fd, lar_name, len ) != len ) data/jam-2.6.1/fileunix.c:343:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if( read( fd, (char *)&fl_hdr, FL_HSZ ) != FL_HSZ || data/jam-2.6.1/fileunix.c:355:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if( read( fd, (char *)&fl_hdr, FL_HSZ ) != FL_HSZ || data/jam-2.6.1/fileunix.c:371:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read( fd, &ar_hdr, sizeof( ar_hdr ) ) >= sizeof( ar_hdr.hdr ) ) data/jam-2.6.1/filevms.c:123: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). f.f_root.len = strlen( dir ); data/jam-2.6.1/filevms.c:142:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). xfab.fab$b_fns = strlen( dir ); /* length of file name */ data/jam-2.6.1/filevms.c:196: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). f.f_dir.len = strlen( dirname ); data/jam-2.6.1/filevms.c:309: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). library.dsc$w_length = strlen( archive ); data/jam-2.6.1/jam.c:284:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if( strlen( buf ) == 25 ) data/jam-2.6.1/lists.c:184: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). const char *ep = p + strlen( p ); data/jam-2.6.1/newstr.c:54: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 l = strlen( string ); data/jam-2.6.1/pathmac.c:85: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). end = file + strlen( file ); data/jam-2.6.1/pathunix.c:97: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). end = file + strlen( file ); data/jam-2.6.1/pathvms.c:67: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). end = file + strlen( file ); data/jam-2.6.1/regexp.c:282:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (OP(scan) == EXACTLY && strlen(OPERAND(scan)) >= len) { data/jam-2.6.1/regexp.c:284: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). len = strlen(OPERAND(scan)); data/jam-2.6.1/regexp.c:946: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(opnd); data/jam-2.6.1/regexp.c:1103: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). count = strlen(scan); data/jam-2.6.1/regexp.c:1210:9: [1] (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 character. (void) strcpy(buf, ":"); data/jam-2.6.1/regexp.c:1252: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). sprintf(buf+strlen(buf), "OPEN%d", OP(op)-OPEN); data/jam-2.6.1/regexp.c:1264: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). sprintf(buf+strlen(buf), "CLOSE%d", OP(op)-CLOSE); data/jam-2.6.1/search.c:40:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). f->f_root.len = strlen( varlist->string ); data/jam-2.6.1/search.c:56: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). f->f_root.len = strlen( varlist->string ); data/jam-2.6.1/variable.c:84:54: [1] (buffer) strlen: Does not handle 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( ( val = strchr( *e, '=' ) ) || ( val = *e + strlen( *e ) ) ) data/jam-2.6.1/variable.c:112:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( buf, pp, p - pp ); data/jam-2.6.1/variable.c:121:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( buf, *e, val - *e ); data/jam-2.6.1/variable.c:187: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). int so = strlen( l->string ); ANALYSIS SUMMARY: Hits = 201 Lines analyzed = 14478 in approximately 0.39 seconds (36834 lines/second) Physical Source Lines of Code (SLOC) = 9198 Hits@level = [0] 164 [1] 54 [2] 120 [3] 4 [4] 23 [5] 0 Hits@level+ = [0+] 365 [1+] 201 [2+] 147 [3+] 27 [4+] 23 [5+] 0 Hits/KSLOC@level+ = [0+] 39.6825 [1+] 21.8526 [2+] 15.9817 [3+] 2.93542 [4+] 2.50054 [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.