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/sqsh-2.5.16.1/src/sqsh_history.c Examining data/sqsh-2.5.16.1/src/sqsh_env.h Examining data/sqsh-2.5.16.1/src/cmd_warranty.c Examining data/sqsh-2.5.16.1/src/sqsh_tok.c Examining data/sqsh-2.5.16.1/src/sqsh_parser/sqsh_parser.h Examining data/sqsh-2.5.16.1/src/sqsh_parser/sqsh_parser.c Examining data/sqsh-2.5.16.1/src/sqsh_parser/tsql.h Examining data/sqsh-2.5.16.1/src/sqsh_parser/tsql.yy.c Examining data/sqsh-2.5.16.1/src/sqsh_parser/tsql.c Examining data/sqsh-2.5.16.1/src/cmd_buf.c Examining data/sqsh-2.5.16.1/src/cmd_exit.c Examining data/sqsh-2.5.16.1/src/cmd_shell.c Examining data/sqsh-2.5.16.1/src/dsp.c Examining data/sqsh-2.5.16.1/src/alias.h Examining data/sqsh-2.5.16.1/src/sqsh_sigcld.h Examining data/sqsh-2.5.16.1/src/sqsh_func.c Examining data/sqsh-2.5.16.1/src/var_date.c Examining data/sqsh-2.5.16.1/src/sqsh_cmd.h Examining data/sqsh-2.5.16.1/src/sqsh_debug.c Examining data/sqsh-2.5.16.1/src/cmd_input.c Examining data/sqsh-2.5.16.1/src/dsp_html.c Examining data/sqsh-2.5.16.1/src/cmd_reconnect.c Examining data/sqsh-2.5.16.1/src/dsp_bcp.c Examining data/sqsh-2.5.16.1/src/sqsh_avl.c Examining data/sqsh-2.5.16.1/src/sqsh_fork.c Examining data/sqsh-2.5.16.1/src/sqsh_filter.c Examining data/sqsh-2.5.16.1/src/sqsh_job.h Examining data/sqsh-2.5.16.1/src/cmd_wait.c Examining data/sqsh-2.5.16.1/src/sqsh_stdin.c Examining data/sqsh-2.5.16.1/src/sqsh_compat.c Examining data/sqsh-2.5.16.1/src/sqsh_args.c Examining data/sqsh-2.5.16.1/src/cmd_run.c Examining data/sqsh-2.5.16.1/src/sqsh_buf.h Examining data/sqsh-2.5.16.1/src/sqsh_args.h Examining data/sqsh-2.5.16.1/src/sqsh_buf.c Examining data/sqsh-2.5.16.1/src/dsp_x.c Examining data/sqsh-2.5.16.1/src/var_readline.c Examining data/sqsh-2.5.16.1/src/cmd_lock.c Examining data/sqsh-2.5.16.1/src/cmd_for.c Examining data/sqsh-2.5.16.1/src/var_passwd.c Examining data/sqsh-2.5.16.1/src/cmd_redraw.c Examining data/sqsh-2.5.16.1/src/sqsh_job.c Examining data/sqsh-2.5.16.1/src/dsp_vert.c Examining data/sqsh-2.5.16.1/src/dsp_none.c Examining data/sqsh-2.5.16.1/src/sqsh_sig.c Examining data/sqsh-2.5.16.1/src/sqsh_global.h Examining data/sqsh-2.5.16.1/src/var_misc.c Examining data/sqsh-2.5.16.1/src/var_dsp.c Examining data/sqsh-2.5.16.1/src/cmd_go.c Examining data/sqsh-2.5.16.1/src/cmd_history.c Examining data/sqsh-2.5.16.1/src/sqsh_strchr.h Examining data/sqsh-2.5.16.1/src/sqsh_sig.h Examining data/sqsh-2.5.16.1/src/sqsh_filter.h Examining data/sqsh-2.5.16.1/src/sqsh_error.h Examining data/sqsh-2.5.16.1/src/cmd_set.c Examining data/sqsh-2.5.16.1/src/cmd_loop.c Examining data/sqsh-2.5.16.1/src/dsp_conv.c Examining data/sqsh-2.5.16.1/src/cmd_sleep.c Examining data/sqsh-2.5.16.1/src/sqsh_compat.h Examining data/sqsh-2.5.16.1/src/cmd_bcp.c Examining data/sqsh-2.5.16.1/src/sqsh_fd.h Examining data/sqsh-2.5.16.1/src/var.h Examining data/sqsh-2.5.16.1/src/var_ctlib.c Examining data/sqsh-2.5.16.1/src/sqsh_sigcld.c Examining data/sqsh-2.5.16.1/src/sqsh_env.c Examining data/sqsh-2.5.16.1/src/cmd_if.c Examining data/sqsh-2.5.16.1/src/sqsh_stdin.h Examining data/sqsh-2.5.16.1/src/sqsh_tok.h Examining data/sqsh-2.5.16.1/src/cmd_show.c Examining data/sqsh-2.5.16.1/src/sqsh_varbuf.h Examining data/sqsh-2.5.16.1/src/cmd_read.c Examining data/sqsh-2.5.16.1/src/dsp_meta.c Examining data/sqsh-2.5.16.1/src/dsp_out.c Examining data/sqsh-2.5.16.1/src/sqsh_avl.h Examining data/sqsh-2.5.16.1/src/cmd_jobs.c Examining data/sqsh-2.5.16.1/src/cmd_help.c Examining data/sqsh-2.5.16.1/src/cmd_func.c Examining data/sqsh-2.5.16.1/src/sqsh_error.c Examining data/sqsh-2.5.16.1/src/cmd_while.c Examining data/sqsh-2.5.16.1/src/dsp_horiz.c Examining data/sqsh-2.5.16.1/src/sqsh_history.h Examining data/sqsh-2.5.16.1/src/var_hist.c Examining data/sqsh-2.5.16.1/src/dsp_pretty.c Examining data/sqsh-2.5.16.1/src/sqsh_config.h Examining data/sqsh-2.5.16.1/src/cmd_kill.c Examining data/sqsh-2.5.16.1/src/cmd_do.c Examining data/sqsh-2.5.16.1/src/cmd_input.h Examining data/sqsh-2.5.16.1/src/sqsh_init.h Examining data/sqsh-2.5.16.1/src/cmd_alias.c Examining data/sqsh-2.5.16.1/src/sqsh_fork.h Examining data/sqsh-2.5.16.1/src/sqsh_alias.c Examining data/sqsh-2.5.16.1/src/sqsh_expand.h Examining data/sqsh-2.5.16.1/src/sqsh_fd.c Examining data/sqsh-2.5.16.1/src/cmd_misc.c Examining data/sqsh-2.5.16.1/src/sqsh_func.h Examining data/sqsh-2.5.16.1/src/sqsh_cmd.c Examining data/sqsh-2.5.16.1/src/cmd_rpc.c Examining data/sqsh-2.5.16.1/src/sqsh_alias.h Examining data/sqsh-2.5.16.1/src/cmd_echo.c Examining data/sqsh-2.5.16.1/src/sqsh_strchr.c Examining data/sqsh-2.5.16.1/src/cmd_return.c Examining data/sqsh-2.5.16.1/src/sqsh_global.c Examining data/sqsh-2.5.16.1/src/sqsh_expand.c Examining data/sqsh-2.5.16.1/src/var_thresh.c Examining data/sqsh-2.5.16.1/src/sqsh_test.c Examining data/sqsh-2.5.16.1/src/cmd_reset.c Examining data/sqsh-2.5.16.1/src/cmd.h Examining data/sqsh-2.5.16.1/src/cmd_misc.h Examining data/sqsh-2.5.16.1/src/sqsh_varbuf.c Examining data/sqsh-2.5.16.1/src/cmd_connect.c Examining data/sqsh-2.5.16.1/src/dsp.h Examining data/sqsh-2.5.16.1/src/dsp_csv.c Examining data/sqsh-2.5.16.1/src/dsp_desc.c Examining data/sqsh-2.5.16.1/src/sqsh_debug.h Examining data/sqsh-2.5.16.1/src/sqsh_getopt.c Examining data/sqsh-2.5.16.1/src/sqsh_getopt.h Examining data/sqsh-2.5.16.1/src/sqsh_init.c Examining data/sqsh-2.5.16.1/src/sqsh_main.c Examining data/sqsh-2.5.16.1/src/sqsh_readline.c Examining data/sqsh-2.5.16.1/src/sqsh_readline.h Examining data/sqsh-2.5.16.1/src/var_debug.c Examining data/sqsh-2.5.16.1/cygwin/config.h FINAL RESULTS: data/sqsh-2.5.16.1/src/cmd_buf.c:133:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf( new_bufname, "!%s", src_buf ) ; data/sqsh-2.5.16.1/src/cmd_buf.c:563:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf( path, "%s/sqsh-edit.%d.sql", tmp_dir, (int)getpid() ); data/sqsh-2.5.16.1/src/cmd_buf.c:581:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf( str, "%s %s\n", editor, path ); data/sqsh-2.5.16.1/src/cmd_buf.c:586:6: [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. c = system(str); data/sqsh-2.5.16.1/src/cmd_connect.c:315:21: [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( orig_password, g_password ); data/sqsh-2.5.16.1/src/cmd_connect.c:482:36: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (session != NULL && access( session, R_OK ) != -1) data/sqsh-2.5.16.1/src/cmd_connect.c:487:17: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (cp, "\\loop -n %s", session); data/sqsh-2.5.16.1/src/cmd_connect.c:1315:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf( sqlbuf, "use %s", autouse ); data/sqsh-2.5.16.1/src/cmd_connect.c:1362:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (sqlbuf, "set clientapplname '%s'", clientapplname); data/sqsh-2.5.16.1/src/cmd_connect.c:1368:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (sqlbuf, "set clienthostname '%s'", clienthostname); data/sqsh-2.5.16.1/src/cmd_connect.c:1374:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (sqlbuf, "set clientname '%s'", clientname); data/sqsh-2.5.16.1/src/cmd_do.c:103: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 ( orig_password, g_password); data/sqsh-2.5.16.1/src/cmd_do.c:551:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf( new_prompt, "${prompt_indent}%s", prompt ); data/sqsh-2.5.16.1/src/cmd_help.c:88:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf( help_file, "%s/%s.1", help_dir, argv[1] ) ; data/sqsh-2.5.16.1/src/cmd_history.c:162:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf( hdrinfo, "(%2d - %2d/%s) ", data/sqsh-2.5.16.1/src/cmd_if.c:240:8: [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. if (execvp( argv[0], argv ) == -1) data/sqsh-2.5.16.1/src/cmd_if.c:333:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf( new_prompt, "${prompt_indent}%s", prompt ); data/sqsh-2.5.16.1/src/cmd_lock.c:149:24: [4] (crypto) crypt: The crypt functions use a poor one-way hashing algorithm; since they only accept passwords of 8 characters or fewer and only a two-byte salt, they are excessively vulnerable to dictionary attacks given today's faster computing equipment (CWE-327). Use a different algorithm, such as SHA-256, with a larger, non-repeating salt. crypt_pass = (char*)crypt( pass, real_pass ); data/sqsh-2.5.16.1/src/cmd_read.c:176:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf( cptr, "%s%s", var_value, str ); data/sqsh-2.5.16.1/src/cmd_shell.c:102:16: [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. exit_status = system( varbuf_getstr(shell_cmd) ); data/sqsh-2.5.16.1/src/cmd_shell.c:147: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 (owd, tmp); data/sqsh-2.5.16.1/src/cmd_shell.c:192:16: [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. exit_status = system ( "ls" ); data/sqsh-2.5.16.1/src/dsp_out.c:132:14: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. o->o_nbuf = vsprintf( o->o_buf, fmt, ap ); data/sqsh-2.5.16.1/src/sqsh_buf.c:466:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (arg, parm); data/sqsh-2.5.16.1/src/sqsh_compat.c:127:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf( buf, "%s=%s", var_name, var_value ); data/sqsh-2.5.16.1/src/sqsh_compat.c:217:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy( new_s, s ) ; data/sqsh-2.5.16.1/src/sqsh_debug.c:86:2: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf( sg_debug_file, fmt, ap ) ; data/sqsh-2.5.16.1/src/sqsh_env.c:844: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( v->var_value, value ); data/sqsh-2.5.16.1/src/sqsh_error.c:103:4: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. vsprintf( tmp_errstr, fmt, ap ) ; data/sqsh-2.5.16.1/src/sqsh_error.c:106: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( sg_sqsh_errstr, tmp_errstr ) ; data/sqsh-2.5.16.1/src/sqsh_fd.c:487:4: [4] (shell) execl: 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. execl( shell, "sh", "-c", shell_job, (char*)0 ) ; data/sqsh-2.5.16.1/src/sqsh_job.c:539: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( msg, sqsh_get_errstr() ); data/sqsh-2.5.16.1/src/sqsh_job.c:1061:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf( defer_path, "%s/sqsh-dfr.%d-%d", tmp_dir, (int) getpid(), job->job_id ); data/sqsh-2.5.16.1/src/sqsh_main.c:248:17: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access( argv[2], R_OK ) == -1) data/sqsh-2.5.16.1/src/sqsh_main.c:293: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(str, rcfile); data/sqsh-2.5.16.1/src/sqsh_main.c:310:17: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access( cptr, R_OK ) != -1) data/sqsh-2.5.16.1/src/sqsh_main.c:569:17: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf( str, "SYBASE=%s", sqsh_optarg ); data/sqsh-2.5.16.1/src/sqsh_main.c:592:21: [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, sqsh_optarg); data/sqsh-2.5.16.1/src/sqsh_main.c:1038:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf( str, " [%s]", sg_flags[i].flag ); data/sqsh-2.5.16.1/src/sqsh_main.c:1040:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf( str, " [%s %s]", sg_flags[i].flag, sg_flags[i].arg ); data/sqsh-2.5.16.1/src/sqsh_main.c:1168:14: [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. (void) execvp (argv[0], argv); data/sqsh-2.5.16.1/src/sqsh_parser/sqsh_parser.c:51:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(tdef->table, table); data/sqsh-2.5.16.1/src/sqsh_parser/sqsh_parser.c:52:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(tdef->alias, alias); data/sqsh-2.5.16.1/src/sqsh_readline.c:1159:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy( str, word ); data/sqsh-2.5.16.1/src/sqsh_readline.c:1298:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (query, "select \'%s.\' + name from %s..syscolumns where id=object_id(\'%s\') order by name" data/sqsh-2.5.16.1/src/sqsh_readline.c:1302:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (query, "select \'%s.\' + name from syscolumns where id=object_id(\'%s\') order by name" data/sqsh-2.5.16.1/src/sqsh_varbuf.c:431:2: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. vsprintf( buffer, str, ap ) ; data/sqsh-2.5.16.1/src/var_ctlib.c:73:6: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access( interfaces, R_OK ) == -1) data/sqsh-2.5.16.1/src/var_debug.c:140:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf( error_msg, "Valid values are: %s", debug_list[0].d_name ); data/sqsh-2.5.16.1/src/var_debug.c:143:6: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat( error_msg, debug_list[i].d_name ); data/sqsh-2.5.16.1/src/var_misc.c:68:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(str, "%s=", var_name ); data/sqsh-2.5.16.1/src/var_misc.c:73:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(str, "%s=%s", var_name, *var_value ); data/sqsh-2.5.16.1/src/var_misc.c:353: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( number, value+1 ) ; data/sqsh-2.5.16.1/src/var_misc.c:389:6: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if( access( *var_value, W_OK ) == -1 ) { data/sqsh-2.5.16.1/src/var_misc.c:410:6: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access( *var_value, R_OK ) == -1) data/sqsh-2.5.16.1/src/sqsh_env.c:445:13: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. *value = getenv( var_name ); data/sqsh-2.5.16.1/src/sqsh_env.c:462:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. *value = getenv( cptr ); data/sqsh-2.5.16.1/src/sqsh_env.c:468:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. *value = getenv( var_name ); data/sqsh-2.5.16.1/src/var_misc.c:88:6: [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. c = getenv(var_name); data/sqsh-2.5.16.1/src/cmd_bcp.c:241:34: [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). if ((batchsize = atoi(sqsh_optarg)) <= 0) data/sqsh-2.5.16.1/src/cmd_bcp.c:265:34: [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). if ((maxerrors = atoi(sqsh_optarg)) <= 0) data/sqsh-2.5.16.1/src/cmd_bcp.c:596: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). i = atoi(packet_size); data/sqsh-2.5.16.1/src/cmd_bcp.c:908:28: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). bcp_slicenum = atoi (bcp_partition); data/sqsh-2.5.16.1/src/cmd_buf.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 new_bufname[64] ; data/sqsh-2.5.16.1/src/cmd_buf.c:136: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( new_bufname, "!!" ) ; data/sqsh-2.5.16.1/src/cmd_buf.c:453: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[SQSH_MAXPATH+1] ; /* Location of edit file */ data/sqsh-2.5.16.1/src/cmd_buf.c:454:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[SQSH_MAXPATH+1] ; /* Command to be executed */ data/sqsh-2.5.16.1/src/cmd_connect.c:183: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 use_database[128] ; data/sqsh-2.5.16.1/src/cmd_connect.c:188: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 orig_password[SQSH_PASSLEN+1]; data/sqsh-2.5.16.1/src/cmd_connect.c:190: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 sqlbuf[64]; data/sqsh-2.5.16.1/src/cmd_connect.c:191: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 passbuf[64]; data/sqsh-2.5.16.1/src/cmd_connect.c:718:64: [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). if (query_timeout != NULL && *query_timeout != '\0' && atoi (query_timeout) > 0) data/sqsh-2.5.16.1/src/cmd_connect.c:720:26: [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). SybTimeOut = atoi (query_timeout); data/sqsh-2.5.16.1/src/cmd_connect.c:735:64: [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). if (login_timeout != NULL && *login_timeout != '\0' && atoi (login_timeout) > 0) data/sqsh-2.5.16.1/src/cmd_connect.c:737:26: [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). SybTimeOut = atoi (login_timeout); data/sqsh-2.5.16.1/src/cmd_connect.c:913: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). i = atoi(packet_size); data/sqsh-2.5.16.1/src/cmd_connect.c:1509:34: [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). if( cptr == NULL || (width = atoi(cptr)) <= 10 ) data/sqsh-2.5.16.1/src/cmd_connect.c:1568: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 var_value[31]; data/sqsh-2.5.16.1/src/cmd_connect.c:1583:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf( var_value, "%d", (int) msg->msgnumber ); data/sqsh-2.5.16.1/src/cmd_connect.c:1658:34: [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). msg->severity >= (CS_INT)atoi(thresh_display)) data/sqsh-2.5.16.1/src/cmd_connect.c:1674:45: [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). p2faxm_int = (p2faxm != NULL) ? atoi(p2faxm) : 0; data/sqsh-2.5.16.1/src/cmd_connect.c:1731:57: [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). if (thresh_fail != NULL && msg->severity >= (CS_INT)atoi(thresh_fail)) data/sqsh-2.5.16.1/src/cmd_connect.c:1851:60: [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). if (max_timeout != NULL && *max_timeout != '\0' && atoi(max_timeout) > 0) data/sqsh-2.5.16.1/src/cmd_connect.c:1853:29: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if (timeouts >= atoi(max_timeout)) data/sqsh-2.5.16.1/src/cmd_connect.c:2084: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 dttm[32]; data/sqsh-2.5.16.1/src/cmd_do.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 orig_password[SQSH_PASSLEN+1] = ""; /* Current session password */ data/sqsh-2.5.16.1/src/cmd_do.c:527: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 prompt_indent[64]; data/sqsh-2.5.16.1/src/cmd_do.c:528: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 new_prompt[128]; data/sqsh-2.5.16.1/src/cmd_do.c:529: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 cmd[6]; data/sqsh-2.5.16.1/src/cmd_do.c:564:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((void*)&(orig_jmpbuf), (void*)&(sg_jmp_buf), sizeof(JMP_BUF)); data/sqsh-2.5.16.1/src/cmd_do.c:582: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((void*)&(sg_jmp_buf), (void*)&(orig_jmpbuf), sizeof(JMP_BUF)); data/sqsh-2.5.16.1/src/cmd_do.c:634: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((void*)&(sg_jmp_buf), (void*)&(orig_jmpbuf), sizeof(JMP_BUF)); data/sqsh-2.5.16.1/src/cmd_do.c:707:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((void*)&(sg_jmp_buf), (void*)&(orig_jmpbuf), sizeof(JMP_BUF)); data/sqsh-2.5.16.1/src/cmd_go.c:84: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 pause_buf[5]; /* Buffer for "hit enter" */ data/sqsh-2.5.16.1/src/cmd_go.c:202: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). sleep_time = atoi(sqsh_optarg); data/sqsh-2.5.16.1/src/cmd_go.c:262:16: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). iterations = atoi(argv[argc-1]); data/sqsh-2.5.16.1/src/cmd_go.c:636:8: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). i = atoi(thresh_exit); data/sqsh-2.5.16.1/src/cmd_go.c:638:17: [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). if (i > 0 && atoi(batch_failcount) >= i) data/sqsh-2.5.16.1/src/cmd_help.c:48: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 help_file[SQSH_MAXPATH+1] ; data/sqsh-2.5.16.1/src/cmd_help.c:49: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 help_line[512] ; data/sqsh-2.5.16.1/src/cmd_help.c:90: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( (fp = fopen( help_file, "r" )) == NULL ) { data/sqsh-2.5.16.1/src/cmd_help.c:131:9: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). len = atoi( width ) ; data/sqsh-2.5.16.1/src/cmd_history.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 dttm[32]; data/sqsh-2.5.16.1/src/cmd_history.c:65: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 hdrinfo[64]; data/sqsh-2.5.16.1/src/cmd_history.c:68: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 fmt[64]; data/sqsh-2.5.16.1/src/cmd_history.c:89:20: [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). if ((shownum = atoi(sqsh_optarg)) <= 0) data/sqsh-2.5.16.1/src/cmd_history.c:126: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 (fmt, "%Y%m%d %H:%M:%S"); data/sqsh-2.5.16.1/src/cmd_history.c:166: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( hdrinfo, "(%d) ", hb->hb_nbr ) ; data/sqsh-2.5.16.1/src/cmd_history.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 str[16]; data/sqsh-2.5.16.1/src/cmd_history.c:240:5: [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( str, "%d", history_get_nbr(g_history) ); data/sqsh-2.5.16.1/src/cmd_history.c:260:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[16]; data/sqsh-2.5.16.1/src/cmd_history.c:306:5: [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( str, "%d", history_get_nbr(g_history) ); data/sqsh-2.5.16.1/src/cmd_if.c:182:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char nbr[16]; data/sqsh-2.5.16.1/src/cmd_if.c:219: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). *exit_status = atoi(return_str); data/sqsh-2.5.16.1/src/cmd_if.c:280:4: [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( nbr, "%d", *exit_status ); data/sqsh-2.5.16.1/src/cmd_if.c:301: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 prompt_indent[64]; data/sqsh-2.5.16.1/src/cmd_if.c:302: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 new_prompt[128]; data/sqsh-2.5.16.1/src/cmd_if.c:303: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 cmd[6]; data/sqsh-2.5.16.1/src/cmd_if.c:346:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((void*)&(orig_jmpbuf), (void*)&(sg_jmp_buf), sizeof(JMP_BUF)); data/sqsh-2.5.16.1/src/cmd_if.c:366: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((void*)&(sg_jmp_buf), (void*)&(orig_jmpbuf), sizeof(JMP_BUF)); data/sqsh-2.5.16.1/src/cmd_if.c:424: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((void*)&(sg_jmp_buf), (void*)&(orig_jmpbuf), sizeof(JMP_BUF)); data/sqsh-2.5.16.1/src/cmd_if.c:638:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((void*)&(sg_jmp_buf), (void*)&(orig_jmpbuf), sizeof(JMP_BUF)); data/sqsh-2.5.16.1/src/cmd_input.c:134: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 number[50] ; /* Generic buffer */ data/sqsh-2.5.16.1/src/cmd_input.c:168: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((void*)&(old_jmp_buf),(void*)&(sg_jmp_buf),sizeof(JMP_BUF)); data/sqsh-2.5.16.1/src/cmd_input.c:197:23: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). orig_lineno = atoi(lineno); data/sqsh-2.5.16.1/src/cmd_input.c:487:26: [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). cur_lineno = atoi(lineno); data/sqsh-2.5.16.1/src/cmd_input.c:544:33: [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( number, "%d", history_get_nbr(g_history) ); data/sqsh-2.5.16.1/src/cmd_input.c:569:29: [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( number, "=%d", cur_lineno ); data/sqsh-2.5.16.1/src/cmd_input.c:597:29: [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( number, "=%d", cur_lineno ); data/sqsh-2.5.16.1/src/cmd_input.c:621: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( number, "%d", history_get_nbr(g_history) ); data/sqsh-2.5.16.1/src/cmd_input.c:741:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf( number, "=%d", orig_lineno ); data/sqsh-2.5.16.1/src/cmd_input.c:760: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((void*)&(sg_jmp_buf),(void*)&(old_jmp_buf),sizeof(JMP_BUF)); data/sqsh-2.5.16.1/src/cmd_jobs.c:47: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 date_str[64] ; data/sqsh-2.5.16.1/src/cmd_kill.c:57:16: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if ((job_id = atoi(argv[1])) <= 0) { data/sqsh-2.5.16.1/src/cmd_lock.c:58: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 pass[25]; data/sqsh-2.5.16.1/src/cmd_loop.c:155: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 ((input_file = fopen( (char*)file_name, "r" )) == NULL) data/sqsh-2.5.16.1/src/cmd_read.c:57: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 input[512]; data/sqsh-2.5.16.1/src/cmd_return.c:42: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 nbr[10]; data/sqsh-2.5.16.1/src/cmd_return.c:50:7: [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). r = atoi(argv[1]); data/sqsh-2.5.16.1/src/cmd_return.c:51: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( nbr, "%d", r ); data/sqsh-2.5.16.1/src/cmd_run.c:178:20: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((input_file = fopen( (char*) file_name, "r" )) == NULL) data/sqsh-2.5.16.1/src/cmd_shell.c:48: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 exit_status_str[10]; data/sqsh-2.5.16.1/src/cmd_shell.c:108:2: [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( exit_status_str, "%d", exit_status ); data/sqsh-2.5.16.1/src/cmd_shell.c:123: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 tmp[512] = ""; /* Tmp storage area */ data/sqsh-2.5.16.1/src/cmd_shell.c:124: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 owd[512] = ""; /* Old working directory (previous) */ data/sqsh-2.5.16.1/src/cmd_shell.c:160: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 pwd[512]; data/sqsh-2.5.16.1/src/cmd_shell.c:182:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char return_value[10]; data/sqsh-2.5.16.1/src/cmd_shell.c:193:2: [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 (return_value, "%d", exit_status); data/sqsh-2.5.16.1/src/cmd_show.c:48:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[1024] ; data/sqsh-2.5.16.1/src/cmd_show.c:58:33: [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). if ((job_id = (job_id_t)atoi(argv[1])) <= 0) { data/sqsh-2.5.16.1/src/cmd_show.c:92:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if( (file = fopen( output, "r" )) == NULL ) { data/sqsh-2.5.16.1/src/cmd_sleep.c:54:12: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). seconds = atoi(argv[1]) ; data/sqsh-2.5.16.1/src/cmd_wait.c:63:26: [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). if ((job_id = (job_id_t)atoi(argv[1])) == 0) { data/sqsh-2.5.16.1/src/dsp.h:194: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 o_buf[DSP_BUFSIZE]; data/sqsh-2.5.16.1/src/dsp.h:214: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 p_colsep[MAX_SEPLEN+1]; /* Current column separator */ data/sqsh-2.5.16.1/src/dsp.h:216: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 p_linesep[MAX_SEPLEN+1]; /* Current Line separator */ data/sqsh-2.5.16.1/src/dsp.h:218: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 p_xgeom[MAX_XGEOM+1]; /* Maximum xgeometry */ data/sqsh-2.5.16.1/src/dsp.h:225: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 p_bcp_colsep[MAX_SEPLEN+1]; /* Current bcp column separator */ data/sqsh-2.5.16.1/src/dsp.h:227: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 p_bcp_rowsep[MAX_SEPLEN+1]; /* Current bcp row separator */ data/sqsh-2.5.16.1/src/dsp.h:231:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char p_csv_colsep[MAX_SEPLEN+1]; /* Current csv column separator */ data/sqsh-2.5.16.1/src/dsp_conv.c:53:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char sg_datetime_fmt[64] = "\0"; data/sqsh-2.5.16.1/src/dsp_conv.c:54:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char sg_date_fmt[64] = "\0"; data/sqsh-2.5.16.1/src/dsp_conv.c:55:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char sg_time_fmt[64] = "\0"; data/sqsh-2.5.16.1/src/dsp_conv.c:66:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char sg_datetime_def[64] = "%b %d %Y %l:%M:%S.%q%p"; data/sqsh-2.5.16.1/src/dsp_conv.c:67:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char sg_time_def[64] = "%l:%M:%S.%q%p"; data/sqsh-2.5.16.1/src/dsp_conv.c:383:21: [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( dt_buf, "%d/12/1997 11:59:53.123PM", i ); data/sqsh-2.5.16.1/src/dsp_conv.c:386:21: [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( dt_buf, "%d/12/1997 11:59PM", i ); data/sqsh-2.5.16.1/src/dsp_conv.c:390:21: [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( dt_buf, "%d/12/1997", i ); data/sqsh-2.5.16.1/src/dsp_conv.c:394:21: [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( dt_buf, "%d/12/1997 11:59:53PM", i ); data/sqsh-2.5.16.1/src/dsp_conv.c:412:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf( dt_buf, "11:59:53.123PM" ); data/sqsh-2.5.16.1/src/dsp_conv.c:833:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char new_fmt[64]; data/sqsh-2.5.16.1/src/dsp_conv.c:852: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( cp, "%06d", ms ); data/sqsh-2.5.16.1/src/dsp_conv.c:858: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( cp, "%03d", ms ); data/sqsh-2.5.16.1/src/dsp_desc.c:606: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( d->d_cols[i].c_data, "0x" ); data/sqsh-2.5.16.1/src/dsp_desc.c:679: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*)d->d_cols[i].c_data, "%*.*f", data/sqsh-2.5.16.1/src/dsp_desc.c:686: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*)d->d_cols[i].c_data, "%*.*f", data/sqsh-2.5.16.1/src/dsp_meta.c:260:9: [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(fmt, "CS_UNUSED" ); data/sqsh-2.5.16.1/src/dsp_meta.c:271:9: [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( fmt, "CS_HIDDEN" ); data/sqsh-2.5.16.1/src/dsp_meta.c:281:9: [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( fmt, "CS_KEY" ); data/sqsh-2.5.16.1/src/dsp_meta.c:291:9: [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( fmt, "CS_VERSION_KEY" ); data/sqsh-2.5.16.1/src/dsp_meta.c:301:9: [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( fmt, "CS_NODATA" ); data/sqsh-2.5.16.1/src/dsp_meta.c:311:9: [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( fmt, "CS_UPDATABLE" ); data/sqsh-2.5.16.1/src/dsp_meta.c:321:9: [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( fmt, "CS_CANBENULL" ); data/sqsh-2.5.16.1/src/dsp_meta.c:331:9: [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( fmt, "CS_DESCIN" ); data/sqsh-2.5.16.1/src/dsp_meta.c:341:9: [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( fmt, "CS_DESCOUT" ); data/sqsh-2.5.16.1/src/dsp_meta.c:351:9: [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( fmt, "CS_INPUTVALUE" ); data/sqsh-2.5.16.1/src/dsp_meta.c:361:9: [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( fmt, "CS_UPDATECOL" ); data/sqsh-2.5.16.1/src/dsp_meta.c:371:9: [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( fmt, "CS_RETURN" ); data/sqsh-2.5.16.1/src/dsp_meta.c:382:9: [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( fmt, "CS_RETURN_CANBENULL" ); data/sqsh-2.5.16.1/src/dsp_meta.c:393:9: [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( fmt, "CS_TIMESTAMP" ); data/sqsh-2.5.16.1/src/dsp_meta.c:403:9: [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( fmt, "CS_NODEFAULT" ); data/sqsh-2.5.16.1/src/dsp_meta.c:413:9: [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( fmt, "CS_IDENTITY" ); data/sqsh-2.5.16.1/src/dsp_meta.c:433:9: [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( fmt, "CS_FMT_UNUSED" ); data/sqsh-2.5.16.1/src/dsp_meta.c:444:9: [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( fmt, "CS_FMT_NULLTERM" ); data/sqsh-2.5.16.1/src/dsp_meta.c:454:9: [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( fmt, "CS_FMT_PADNULL" ); data/sqsh-2.5.16.1/src/dsp_meta.c:464:9: [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( fmt, "CS_FMT_PADBLANK" ); data/sqsh-2.5.16.1/src/dsp_meta.c:474:9: [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( fmt, "CS_FMT_JUSTIFY_RT" ); data/sqsh-2.5.16.1/src/dsp_meta.c:486:9: [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( fmt, "CS_FMT_STRIPBLANKS" ); data/sqsh-2.5.16.1/src/dsp_meta.c:499:9: [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( fmt, "CS_FMT_SAFESTR" ); data/sqsh-2.5.16.1/src/dsp_x.c:99: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 number[20]; /* Holder for number */ data/sqsh-2.5.16.1/src/dsp_x.c:125: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). width = atoi(number); data/sqsh-2.5.16.1/src/dsp_x.c:129: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). height = atoi( cp + 1 ); data/sqsh-2.5.16.1/src/dsp_x.c:273: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[1]; data/sqsh-2.5.16.1/src/dsp_x.c:437: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 buffer[2048]; /* Read up to 2K of input */ data/sqsh-2.5.16.1/src/dsp_x.c:521:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *argv[1]; data/sqsh-2.5.16.1/src/dsp_x.c:650: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 number[20]; data/sqsh-2.5.16.1/src/dsp_x.c:656: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( number, "Lines: %d", cd->c_lines ); data/sqsh-2.5.16.1/src/dsp_x.c:684: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 buffer[1024]; /* Read up to 1K of input */ data/sqsh-2.5.16.1/src/dsp_x.c:689: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 number[20]; data/sqsh-2.5.16.1/src/dsp_x.c:699: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( number, "Lines: %d", cd->c_lines ); data/sqsh-2.5.16.1/src/dsp_x.c:723:5: [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( number, "Lines: %d", cd->c_lines ); data/sqsh-2.5.16.1/src/sqsh_alias.c:173: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 alias_name[MAX_ALIAS+1] ; data/sqsh-2.5.16.1/src/sqsh_alias.c:308: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 alias_name[MAX_ALIAS+1]; data/sqsh-2.5.16.1/src/sqsh_buf.c:95:10: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). i = atoi( buf_name + 1 ) ; data/sqsh-2.5.16.1/src/sqsh_buf.c:164: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( (save_file = fopen( save_name, mode )) == NULL ) { data/sqsh-2.5.16.1/src/sqsh_buf.c:194:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[1024]; data/sqsh-2.5.16.1/src/sqsh_buf.c:209:20: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((load_file = fopen( file_name, "r" )) == NULL) data/sqsh-2.5.16.1/src/sqsh_buf.c:457: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 arg[12]; data/sqsh-2.5.16.1/src/sqsh_buf.c:471:7: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). i = atoi( arg ); data/sqsh-2.5.16.1/src/sqsh_buf.c:472:7: [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). j = atoi( p+1 ); data/sqsh-2.5.16.1/src/sqsh_buf.c:481:20: [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). else if ( (i = atoi( arg )) > 0) data/sqsh-2.5.16.1/src/sqsh_compat.c:303:20: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((read_fp = fopen( tty_name, "r" )) == NULL) data/sqsh-2.5.16.1/src/sqsh_compat.c:310: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 ((write_fp = fopen( tty_name, "w" )) == NULL) data/sqsh-2.5.16.1/src/sqsh_compat.h:78:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. # define memcpy(b1,b2,length) bcopy(b1,b2,length) data/sqsh-2.5.16.1/src/sqsh_compat.h:78:35: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. # define memcpy(b1,b2,length) bcopy(b1,b2,length) data/sqsh-2.5.16.1/src/sqsh_compat.h:82:36: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. # define memmove(b1,b2,length) bcopy(b1,b2,length) data/sqsh-2.5.16.1/src/sqsh_error.c:49:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char sg_sqsh_errstr[MAX_ERRLEN+1] ; data/sqsh-2.5.16.1/src/sqsh_error.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 tmp_errstr[MAX_ERRLEN+1] ; data/sqsh-2.5.16.1/src/sqsh_expand.c:654: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 nbr[32]; data/sqsh-2.5.16.1/src/sqsh_expand.c:771:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(nbr, "%d", (int) getpid() ); data/sqsh-2.5.16.1/src/sqsh_expand.c:793:13: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(nbr, "%d", g_func_args[g_func_nargs-1].argc - 1 ); data/sqsh-2.5.16.1/src/sqsh_expand.c:833:20: [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). arg_nbr = atoi(nbr); data/sqsh-2.5.16.1/src/sqsh_expand.c:897: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 number[6]; data/sqsh-2.5.16.1/src/sqsh_expand.c:942: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). col = atoi(number); data/sqsh-2.5.16.1/src/sqsh_expand.c:1139:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char buf [PROMPTSZ+OVFLSZ]; data/sqsh-2.5.16.1/src/sqsh_expand.c:1181: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 (buf, "sqsh> "); data/sqsh-2.5.16.1/src/sqsh_fd.c:167:12: [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( filename, flags, mode )) == -1 ) { data/sqsh-2.5.16.1/src/sqsh_fd.c:624: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 exit_str[16]; data/sqsh-2.5.16.1/src/sqsh_fd.c:705:4: [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( exit_str, "%d", exit_status ); data/sqsh-2.5.16.1/src/sqsh_filter.c:58: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 line[1024]; /* Line read from input */ data/sqsh-2.5.16.1/src/sqsh_history.c:549: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( (fptr = fopen( save_file, "w" )) == NULL ) { data/sqsh-2.5.16.1/src/sqsh_history.c:592:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[1024] ; data/sqsh-2.5.16.1/src/sqsh_history.c:607: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( (fptr = fopen( load_file, "r" )) == NULL ) { data/sqsh-2.5.16.1/src/sqsh_history.c:674:21: [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). count = atoi (p+1)-1; data/sqsh-2.5.16.1/src/sqsh_history.c:676:21: [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). dttm = atoi (str+18); data/sqsh-2.5.16.1/src/sqsh_history.c:904:26: [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). ++h->h_change < atoi(hist_auto_save) ) data/sqsh-2.5.16.1/src/sqsh_history.c:942: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 hdrinfo[64]; data/sqsh-2.5.16.1/src/sqsh_history.c:1023:21: [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 (hdrinfo, "(%d) ", hbx->hb_nbr); data/sqsh-2.5.16.1/src/sqsh_init.c:257:31: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if( histsize == NULL || (i = atoi( histsize )) == 0 ) data/sqsh-2.5.16.1/src/sqsh_job.c:225: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 msg[512]; data/sqsh-2.5.16.1/src/sqsh_job.c:982: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 defer_path[SQSH_MAXPATH+1]; data/sqsh-2.5.16.1/src/sqsh_main.c:182:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[512]; data/sqsh-2.5.16.1/src/sqsh_main.c:201: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[MAXPWD]; data/sqsh-2.5.16.1/src/sqsh_main.c:595:29: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). fdin = atoi(buf); data/sqsh-2.5.16.1/src/sqsh_main.c:596:29: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). fdout = atoi(p+1); data/sqsh-2.5.16.1/src/sqsh_main.c:701: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). if(!w || atoi(w) == 80) { data/sqsh-2.5.16.1/src/sqsh_main.c:703: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( str, "%d", ws.ws_col ); data/sqsh-2.5.16.1/src/sqsh_main.c:839:13: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf( str, "%d", history_get_nbr(g_history) ); data/sqsh-2.5.16.1/src/sqsh_main.c:903:28: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). sqsh_exit( atoi(batch_failcount) ); data/sqsh-2.5.16.1/src/sqsh_main.c:920:32: [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). if ( exit_value != NULL && atoi(exit_value) != 0 ) data/sqsh-2.5.16.1/src/sqsh_main.c:921:20: [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). sqsh_exit( atoi(exit_value) ); data/sqsh-2.5.16.1/src/sqsh_main.c:927:20: [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). sqsh_exit( atoi(batch_failcount) ); data/sqsh-2.5.16.1/src/sqsh_main.c:955: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 ctty_path[SQSH_MAXPATH+1]; data/sqsh-2.5.16.1/src/sqsh_main.c:957: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 num[10]; data/sqsh-2.5.16.1/src/sqsh_main.c:983:24: [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 ((ctty_fd = open( ctty_path, O_RDONLY )) == -1) { data/sqsh-2.5.16.1/src/sqsh_main.c:992:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf( num, "%d", (int)ws.ws_col ); data/sqsh-2.5.16.1/src/sqsh_main.c:1019:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[40]; data/sqsh-2.5.16.1/src/sqsh_main.c:1086: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[32]; data/sqsh-2.5.16.1/src/sqsh_main.c:1088: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 nullpwd[2]; data/sqsh-2.5.16.1/src/sqsh_main.c:1153: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, "-%c%d/%d", '\250', filedes[0], filedes[1]); data/sqsh-2.5.16.1/src/sqsh_readline.c:126:24: [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). stifle_value = atoi(readline_histsize); data/sqsh-2.5.16.1/src/sqsh_readline.c:245:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char str[16384]; data/sqsh-2.5.16.1/src/sqsh_readline.c:445: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 keyword[512] ; data/sqsh-2.5.16.1/src/sqsh_readline.c:451: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( (infile = fopen( filename, "r")) == NULL ) { data/sqsh-2.5.16.1/src/sqsh_readline.c:889: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 objname[256]; data/sqsh-2.5.16.1/src/sqsh_test.c:11: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 line[1024]; data/sqsh-2.5.16.1/src/sqsh_test.c:33: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). file = fopen( argv[1], "r" ); data/sqsh-2.5.16.1/src/sqsh_tok.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 number[64]; data/sqsh-2.5.16.1/src/sqsh_tok.c:217:28: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). sg_tok->tok_fd_right = atoi(number); data/sqsh-2.5.16.1/src/sqsh_varbuf.c:102:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(varbuf->vb_buffer + varbuf->vb_cur_length, buf, nbytes) ; data/sqsh-2.5.16.1/src/sqsh_varbuf.c:250: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( varbuf->vb_buffer + start_idx, subst_str, subst_len ) ; data/sqsh-2.5.16.1/src/sqsh_varbuf.c:423: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 buffer[1024] ; data/sqsh-2.5.16.1/src/var_ctlib.c:113:16: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). packet_size = atoi(*var_value); data/sqsh-2.5.16.1/src/var_date.c:47: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 date_str[32] ; /* Hopefully large enough */ data/sqsh-2.5.16.1/src/var_date.c:72: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 time_str[32] ; /* Hopefully large enough */ data/sqsh-2.5.16.1/src/var_debug.c:90: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 debug_number[8] ; data/sqsh-2.5.16.1/src/var_debug.c:92: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 flag_name[40] ; data/sqsh-2.5.16.1/src/var_debug.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 error_msg[256]; data/sqsh-2.5.16.1/src/var_debug.c:133: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). debug_flags |= atoi(flag_name) ; data/sqsh-2.5.16.1/src/var_debug.c:142:6: [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( error_msg, ", " ); data/sqsh-2.5.16.1/src/var_debug.c:157:2: [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( debug_number, "%3d", debug_flags ) ; data/sqsh-2.5.16.1/src/var_dsp.c:48: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 number[64]; data/sqsh-2.5.16.1/src/var_dsp.c:64:9: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). prec = atoi(number); data/sqsh-2.5.16.1/src/var_dsp.c:79:10: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). scale = atoi(number); data/sqsh-2.5.16.1/src/var_dsp.c:135: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 date_str[64]; data/sqsh-2.5.16.1/src/var_dsp.c:167: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 date_str[64]; data/sqsh-2.5.16.1/src/var_dsp.c:199: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 date_str[64]; data/sqsh-2.5.16.1/src/var_dsp.c:332:36: [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). colwidth = (*var_value != NULL) ? atoi(*var_value) : 30; data/sqsh-2.5.16.1/src/var_dsp.c:349: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 nbr[16]; data/sqsh-2.5.16.1/src/var_dsp.c:358:2: [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( nbr, "%d", colwidth ); data/sqsh-2.5.16.1/src/var_dsp.c:376:16: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). outputparms = atoi(*var_value); data/sqsh-2.5.16.1/src/var_dsp.c:393: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 nbr[4]; data/sqsh-2.5.16.1/src/var_dsp.c:402:2: [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( nbr, "%d", outputparms ); data/sqsh-2.5.16.1/src/var_dsp.c:420:33: [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). width = (*var_value != NULL) ? atoi(*var_value) : 0; data/sqsh-2.5.16.1/src/var_dsp.c:437: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 nbr[16]; data/sqsh-2.5.16.1/src/var_dsp.c:446:2: [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( nbr, "%d", width ); data/sqsh-2.5.16.1/src/var_dsp.c:477: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 colsep[32]; data/sqsh-2.5.16.1/src/var_dsp.c:514: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 bcp_colsep[32]; data/sqsh-2.5.16.1/src/var_dsp.c:551: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 bcp_rowsep[32]; data/sqsh-2.5.16.1/src/var_dsp.c:643: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 linesep[32]; data/sqsh-2.5.16.1/src/var_dsp.c:711: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 xgeom[32]; data/sqsh-2.5.16.1/src/var_dsp.c:735:34: [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). maxlen = (*var_value != NULL) ? atoi(*var_value) : 0; data/sqsh-2.5.16.1/src/var_dsp.c:752: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 nbr[16]; data/sqsh-2.5.16.1/src/var_dsp.c:761:2: [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( nbr, "%d", maxlen ); data/sqsh-2.5.16.1/src/var_hist.c:54: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). histsize = atoi(*var_value) ; data/sqsh-2.5.16.1/src/var_misc.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 str[512]; data/sqsh-2.5.16.1/src/var_misc.c:313: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 number[20] ; data/sqsh-2.5.16.1/src/var_misc.c:362: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( number, "%d", atoi(cur_value) - atoi(value+1) ) ; data/sqsh-2.5.16.1/src/var_misc.c:362:26: [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). sprintf( number, "%d", atoi(cur_value) - atoi(value+1) ) ; data/sqsh-2.5.16.1/src/var_misc.c:362:44: [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). sprintf( number, "%d", atoi(cur_value) - atoi(value+1) ) ; data/sqsh-2.5.16.1/src/var_misc.c:364: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( number, "%d", atoi(cur_value) + atoi(value+1) ) ; data/sqsh-2.5.16.1/src/var_misc.c:364:26: [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). sprintf( number, "%d", atoi(cur_value) + atoi(value+1) ) ; data/sqsh-2.5.16.1/src/var_misc.c:364:44: [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). sprintf( number, "%d", atoi(cur_value) + atoi(value+1) ) ; data/sqsh-2.5.16.1/src/var_misc.c:366: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( number, "%d", atoi(cur_value) + atoi(value) ) ; data/sqsh-2.5.16.1/src/var_misc.c:366:26: [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). sprintf( number, "%d", atoi(cur_value) + atoi(value) ) ; data/sqsh-2.5.16.1/src/var_misc.c:366:44: [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). sprintf( number, "%d", atoi(cur_value) + atoi(value) ) ; data/sqsh-2.5.16.1/src/var_misc.c:524:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if( (nfp = fopen( exp_fn, "a" )) == NULL) data/sqsh-2.5.16.1/src/var_readline.c:51:40: [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). stifle_value = (*var_value != NULL) ? atoi(*var_value) : 0; data/sqsh-2.5.16.1/src/var_readline.c:99:7: [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). d = atoi(*var_value); data/sqsh-2.5.16.1/src/var_readline.c:130:2: [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( *var_value, "%d", d ); data/sqsh-2.5.16.1/src/var_thresh.c:55: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). severity = atoi( *var_value ) ; data/sqsh-2.5.16.1/src/cmd_alias.c:59:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen( a->an_name ) ; data/sqsh-2.5.16.1/src/cmd_bcp.c:933: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). strlen(bcp_partition), /* Buffer Length*/ data/sqsh-2.5.16.1/src/cmd_bcp.c:949: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). bcp_table, strlen(bcp_table));) data/sqsh-2.5.16.1/src/cmd_bcp.c:952:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(bcp_table) ) != CS_SUCCEED) data/sqsh-2.5.16.1/src/cmd_connect.c:486:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). cp = malloc (strlen(session) + 12) ; data/sqsh-2.5.16.1/src/cmd_connect.c:583:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( use_database, database, sizeof(use_database)-1 ) ; data/sqsh-2.5.16.1/src/cmd_connect.c:1512: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( str ) ; data/sqsh-2.5.16.1/src/cmd_connect.c:2032: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). if (req_options != NULL && strlen(req_options) > 0 && data/sqsh-2.5.16.1/src/cmd_connect.c:2144:59: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). fmt = (char *) malloc (sizeof(char) * strlen(datetime)+2); data/sqsh-2.5.16.1/src/cmd_help.c:119:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen( c->cmd_name ) ; data/sqsh-2.5.16.1/src/cmd_history.c:171: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). printf( "%*s%*.*s\n", (int) strlen(hdrinfo), " ", (int) (nl - line), (int) (nl - line), line ) ; data/sqsh-2.5.16.1/src/cmd_input.c:895: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). len = strlen( str ); data/sqsh-2.5.16.1/src/cmd_input.c:1286: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). for ( idx = strlen(name) - 1; data/sqsh-2.5.16.1/src/cmd_lock.c:92:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (real_pass == NULL || strlen(real_pass) < 2) { data/sqsh-2.5.16.1/src/cmd_loop.c:88: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). if ((sql_buf = varbuf_create( strlen(sqsh_optarg) + 6 )) == NULL) data/sqsh-2.5.16.1/src/cmd_read.c:169: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). cptr = (char*)malloc( (strlen(var_value)+strlen(str)+1) * sizeof(char) ); data/sqsh-2.5.16.1/src/cmd_read.c:169:46: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). cptr = (char*)malloc( (strlen(var_value)+strlen(str)+1) * sizeof(char) ); data/sqsh-2.5.16.1/src/cmd_rpc.c:526:49: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). srcfmt.maxlength = (str == NULL) ? 0 : (CS_INT)strlen(str); data/sqsh-2.5.16.1/src/cmd_rpc.c:568: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). len = (CS_INT)strlen(str); data/sqsh-2.5.16.1/src/dsp.c:450: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( (char*)ptr ); data/sqsh-2.5.16.1/src/dsp.c:461:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( g_dsp_props.p_colsep, (char*)ptr, len ); data/sqsh-2.5.16.1/src/dsp.c:478: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( (char*)ptr ); data/sqsh-2.5.16.1/src/dsp.c:489:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( g_dsp_props.p_bcp_colsep, (char*)ptr, len ); data/sqsh-2.5.16.1/src/dsp.c:506: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( (char*)ptr ); data/sqsh-2.5.16.1/src/dsp.c:517:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( g_dsp_props.p_bcp_rowsep, (char*)ptr, len ); data/sqsh-2.5.16.1/src/dsp.c:549: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( (char*)ptr ); data/sqsh-2.5.16.1/src/dsp.c:560:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( g_dsp_props.p_linesep, (char*)ptr, len ); data/sqsh-2.5.16.1/src/dsp.c:573: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( (char*)ptr ); data/sqsh-2.5.16.1/src/dsp.c:584:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( g_dsp_props.p_xgeom, (char*)ptr, len ); data/sqsh-2.5.16.1/src/dsp.c:680:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( (char*)ptr, dsp_datetimefmt_get(), len ); data/sqsh-2.5.16.1/src/dsp.c:694:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( (char*)ptr, dsp_datefmt_get(), len ); data/sqsh-2.5.16.1/src/dsp.c:708:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( (char*)ptr, dsp_timefmt_get(), len ); data/sqsh-2.5.16.1/src/dsp.c:740:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( (char*)ptr, g_dsp_props.p_colsep, len ); data/sqsh-2.5.16.1/src/dsp.c:748:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( (char*)ptr, g_dsp_props.p_bcp_colsep, len ); data/sqsh-2.5.16.1/src/dsp.c:756:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( (char*)ptr, g_dsp_props.p_bcp_rowsep, len ); data/sqsh-2.5.16.1/src/dsp.c:772:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( (char*)ptr, g_dsp_props.p_linesep, len ); data/sqsh-2.5.16.1/src/dsp.c:786:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( (char*)ptr, g_dsp_props.p_xgeom, len ); data/sqsh-2.5.16.1/src/dsp_bcp.c:124:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen( desc->d_cols[i].c_data ) ); data/sqsh-2.5.16.1/src/dsp_conv.c:111:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( sg_datetime_fmt, fmt, sizeof(sg_datetime_fmt)-1 ); data/sqsh-2.5.16.1/src/dsp_conv.c:170:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( sg_date_fmt, fmt, sizeof(sg_date_fmt)-1 ); data/sqsh-2.5.16.1/src/dsp_conv.c:231:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( sg_time_fmt, fmt, sizeof(sg_time_fmt)-1 ); data/sqsh-2.5.16.1/src/dsp_conv.c:482: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). len = strlen( dt_buf ); data/sqsh-2.5.16.1/src/dsp_conv.c:512: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). len = strlen( dt_buf ); data/sqsh-2.5.16.1/src/dsp_conv.c:785:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). str_fmt.maxlength = strlen(dat_str); data/sqsh-2.5.16.1/src/dsp_conv.c:817:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return strlen(dat_buf); data/sqsh-2.5.16.1/src/dsp_csv.c:140:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen( desc->d_cols[i].c_data ), data/sqsh-2.5.16.1/src/dsp_desc.c:561: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). p = strlen (d->d_cols[i].c_data); data/sqsh-2.5.16.1/src/dsp_horiz.c:536: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). dat_width = strlen( col->c_data ); data/sqsh-2.5.16.1/src/dsp_horiz.c:671:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for (j = strlen( aggregate_op ); data/sqsh-2.5.16.1/src/dsp_horiz.c:793: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). dat_width = strlen( com_col->c_data ); data/sqsh-2.5.16.1/src/dsp_meta.c:267:13: [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(fmt, "," ); data/sqsh-2.5.16.1/src/dsp_meta.c:277:13: [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(fmt, "," ); data/sqsh-2.5.16.1/src/dsp_meta.c:287:13: [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(fmt, "," ); data/sqsh-2.5.16.1/src/dsp_meta.c:297:13: [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(fmt, "," ); data/sqsh-2.5.16.1/src/dsp_meta.c:307:13: [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(fmt, "," ); data/sqsh-2.5.16.1/src/dsp_meta.c:317:13: [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(fmt, "," ); data/sqsh-2.5.16.1/src/dsp_meta.c:327:13: [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(fmt, "," ); data/sqsh-2.5.16.1/src/dsp_meta.c:337:13: [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(fmt, "," ); data/sqsh-2.5.16.1/src/dsp_meta.c:347:13: [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(fmt, "," ); data/sqsh-2.5.16.1/src/dsp_meta.c:357:13: [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(fmt, "," ); data/sqsh-2.5.16.1/src/dsp_meta.c:367:13: [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(fmt, "," ); data/sqsh-2.5.16.1/src/dsp_meta.c:378:13: [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(fmt, "," ); data/sqsh-2.5.16.1/src/dsp_meta.c:389:13: [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(fmt, "," ); data/sqsh-2.5.16.1/src/dsp_meta.c:399:13: [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(fmt, "," ); data/sqsh-2.5.16.1/src/dsp_meta.c:409:13: [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(fmt, "," ); data/sqsh-2.5.16.1/src/dsp_meta.c:440:13: [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(fmt, "," ); data/sqsh-2.5.16.1/src/dsp_meta.c:450:13: [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(fmt, "," ); data/sqsh-2.5.16.1/src/dsp_meta.c:460:13: [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(fmt, "," ); data/sqsh-2.5.16.1/src/dsp_meta.c:470:13: [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(fmt, "," ); data/sqsh-2.5.16.1/src/dsp_meta.c:482:13: [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(fmt, "," ); data/sqsh-2.5.16.1/src/dsp_meta.c:495:13: [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(fmt, "," ); data/sqsh-2.5.16.1/src/dsp_pretty.c:583: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). dat_width = strlen( col->c_ptr ); data/sqsh-2.5.16.1/src/dsp_pretty.c:773: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). dat_width = strlen( com_col->c_ptr ); data/sqsh-2.5.16.1/src/dsp_vert.c:277:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). col_data_len = strlen( col_data_ptr ); data/sqsh-2.5.16.1/src/dsp_vert.c:404:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). col_data_len = strlen( col_data_ptr ); data/sqsh-2.5.16.1/src/dsp_x.c:446:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = read( *fd, buffer, sizeof(buffer) - 1 ); data/sqsh-2.5.16.1/src/dsp_x.c:694:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = read( *fd, buffer, sizeof(buffer) - 1 ); data/sqsh-2.5.16.1/src/sqsh_alias.c:206:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( alias_name, word_start, len ); data/sqsh-2.5.16.1/src/sqsh_alias.c:332:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( alias_name, word_start, len ); data/sqsh-2.5.16.1/src/sqsh_buf.c:169: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). buf_len = strlen( buf ) ; data/sqsh-2.5.16.1/src/sqsh_buf.c:461:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( parm == NULL || strlen (parm) > sizeof(arg) - 1) data/sqsh-2.5.16.1/src/sqsh_compat.c:120: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). buf_size = strlen(var_name) + strlen(var_value) + 2; data/sqsh-2.5.16.1/src/sqsh_compat.c:120:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). buf_size = strlen(var_name) + strlen(var_value) + 2; data/sqsh-2.5.16.1/src/sqsh_compat.c:198:17: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ch = getc( file ); data/sqsh-2.5.16.1/src/sqsh_compat.c:215:48: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if( (new_s = (char*)malloc(sizeof(char) * (strlen(s)+1))) == NULL ) data/sqsh-2.5.16.1/src/sqsh_compat.c:367:18: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((ch = fgetc( read_fp )) != EOF && ch != '\n') data/sqsh-2.5.16.1/src/sqsh_env.c:830:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (v->var_value == NULL || strlen(value) > strlen(v->var_value)) data/sqsh-2.5.16.1/src/sqsh_env.c:830:46: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (v->var_value == NULL || strlen(value) > strlen(v->var_value)) data/sqsh-2.5.16.1/src/sqsh_expand.c:1089:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy ( tilde_name, str, j - str ); data/sqsh-2.5.16.1/src/sqsh_filter.c:192:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((nbytes = read( infd, line, sizeof(line)-1 )) == -1) data/sqsh-2.5.16.1/src/sqsh_filter.c:238:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((nbytes = read( infd, line, sizeof(line)-1 )) != 0) data/sqsh-2.5.16.1/src/sqsh_history.c:196: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( buf ) ; data/sqsh-2.5.16.1/src/sqsh_history.c:548:18: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). saved_mask = umask( (mode_t) 0066); data/sqsh-2.5.16.1/src/sqsh_history.c:551:9: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(saved_mask); data/sqsh-2.5.16.1/src/sqsh_history.c:554:5: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(saved_mask); data/sqsh-2.5.16.1/src/sqsh_history.c:1026:58: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). fprintf (stdout, "%*s%*.*s\n", (int) strlen (hdrinfo), " ", (int) (nl - line), (int) (nl - line), line); data/sqsh-2.5.16.1/src/sqsh_main.c:599:25: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fdin, buf, MAXPWD-1) <= 0) { data/sqsh-2.5.16.1/src/sqsh_main.c:1042:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen( str ); data/sqsh-2.5.16.1/src/sqsh_main.c:1123:42: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (pwd == NULL || (pwd != NULL && strlen(pwd) == 0)) data/sqsh-2.5.16.1/src/sqsh_main.c:1182:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((int) write (filedes[1], pwd, strlen(pwd)) != (int) strlen(pwd)) data/sqsh-2.5.16.1/src/sqsh_main.c:1182:61: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((int) write (filedes[1], pwd, strlen(pwd)) != (int) strlen(pwd)) data/sqsh-2.5.16.1/src/sqsh_parser/sqsh_parser.c:48: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). tdef->table = (char(*)) xmalloc((strlen(table) + 1) * sizeof (char)); data/sqsh-2.5.16.1/src/sqsh_parser/sqsh_parser.c:49: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). tdef->alias = (char(*)) xmalloc((strlen(alias) + 1) * sizeof (char)); data/sqsh-2.5.16.1/src/sqsh_parser/tsql.yy.c:802:14: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ data/sqsh-2.5.16.1/src/sqsh_parser/tsql.yy.c:1812:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return yy_scan_bytes(yystr,strlen(yystr) ); data/sqsh-2.5.16.1/src/sqsh_readline.c:328:51: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( cp != NULL && *cp == '"' && *(cp+strlen(cp)-1) == '"' ) data/sqsh-2.5.16.1/src/sqsh_readline.c:330: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). *(cp+strlen(cp)-1) = '\0'; data/sqsh-2.5.16.1/src/sqsh_readline.c:893: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). len = strlen(text); data/sqsh-2.5.16.1/src/sqsh_readline.c:925:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for ( idx = strlen(text)-1; idx >= 0 && text[idx] != '.'; idx-- ); data/sqsh-2.5.16.1/src/sqsh_readline.c:928:17: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy ( objname, text, idx ); data/sqsh-2.5.16.1/src/sqsh_readline.c:930:64: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). vb = varbuf_create ( varbuf_getlen(g_sqlbuf) + strlen(rl_line_buffer) ); data/sqsh-2.5.16.1/src/sqsh_readline.c:1114: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). if ((str = (char*) malloc( (strlen(word) + 1) * sizeof(char) )) == NULL) data/sqsh-2.5.16.1/src/sqsh_readline.c:1296:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (dbname, objname, idx); data/sqsh-2.5.16.1/src/sqsh_readline.c:1338: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). for ( idx = strlen(name) - 1; data/sqsh-2.5.16.1/src/sqsh_varbuf.c:135:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(str) ; data/sqsh-2.5.16.1/src/sqsh_varbuf.c:172:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(varbuf->vb_buffer + varbuf->vb_cur_length, str, n) ; data/sqsh-2.5.16.1/src/sqsh_varbuf.c:192: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). subst_len = strlen( subst_str ) ; ANALYSIS SUMMARY: Hits = 448 Lines analyzed = 43139 in approximately 1.09 seconds (39637 lines/second) Physical Source Lines of Code (SLOC) = 26243 Hits@level = [0] 515 [1] 117 [2] 272 [3] 4 [4] 55 [5] 0 Hits@level+ = [0+] 963 [1+] 448 [2+] 331 [3+] 59 [4+] 55 [5+] 0 Hits/KSLOC@level+ = [0+] 36.6955 [1+] 17.0712 [2+] 12.6129 [3+] 2.24822 [4+] 2.0958 [5+] 0 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.