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/bwctl-1.5.4+dfsg1/bwlib/nuttcp.c
Examining data/bwctl-1.5.4+dfsg1/bwlib/missing_getopt.h
Examining data/bwctl-1.5.4+dfsg1/bwlib/bwlib.h
Examining data/bwctl-1.5.4+dfsg1/bwlib/iperf3.c
Examining data/bwctl-1.5.4+dfsg1/bwlib/iperf.c
Examining data/bwctl-1.5.4+dfsg1/bwlib/util.c
Examining data/bwctl-1.5.4+dfsg1/bwlib/io.c
Examining data/bwctl-1.5.4+dfsg1/bwlib/ping.c
Examining data/bwctl-1.5.4+dfsg1/bwlib/rijndael-api-fst.c
Examining data/bwctl-1.5.4+dfsg1/bwlib/thrulay.c
Examining data/bwctl-1.5.4+dfsg1/bwlib/time.c
Examining data/bwctl-1.5.4+dfsg1/bwlib/sapi.c
Examining data/bwctl-1.5.4+dfsg1/bwlib/protocol.c
Examining data/bwctl-1.5.4+dfsg1/bwlib/missing_getopt.c
Examining data/bwctl-1.5.4+dfsg1/bwlib/rijndael-alg-fst.h
Examining data/bwctl-1.5.4+dfsg1/bwlib/endpoint.c
Examining data/bwctl-1.5.4+dfsg1/bwlib/error.c
Examining data/bwctl-1.5.4+dfsg1/bwlib/capi.c
Examining data/bwctl-1.5.4+dfsg1/bwlib/arithm64.c
Examining data/bwctl-1.5.4+dfsg1/bwlib/rijndael-alg-fst.c
Examining data/bwctl-1.5.4+dfsg1/bwlib/tools.c
Examining data/bwctl-1.5.4+dfsg1/bwlib/bwlibP.h
Examining data/bwctl-1.5.4+dfsg1/bwlib/api.c
Examining data/bwctl-1.5.4+dfsg1/bwlib/daemon.c
Examining data/bwctl-1.5.4+dfsg1/bwlib/paris-traceroute.c
Examining data/bwctl-1.5.4+dfsg1/bwlib/context.c
Examining data/bwctl-1.5.4+dfsg1/bwlib/tracepath.c
Examining data/bwctl-1.5.4+dfsg1/bwlib/owamp.c
Examining data/bwctl-1.5.4+dfsg1/bwlib/traceroute.c
Examining data/bwctl-1.5.4+dfsg1/bwlib/rijndael-api-fst.h
Examining data/bwctl-1.5.4+dfsg1/bwctl/bwctlP.h
Examining data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c
Examining data/bwctl-1.5.4+dfsg1/bwctld/policy.c
Examining data/bwctl-1.5.4+dfsg1/bwctld/policy.h
Examining data/bwctl-1.5.4+dfsg1/bwctld/bwctldP.h
Examining data/bwctl-1.5.4+dfsg1/bwctld/missing_queue.h
Examining data/bwctl-1.5.4+dfsg1/bwctld/bwctld.c

FINAL RESULTS:

data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:1322: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(conf_file,home);
data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:1323:9:  [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(conf_file,BWL_PATH_SEPARATOR);
data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:1324:9:  [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(conf_file,BWCTL_DEFAULT_RCNAME);
data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:2362: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(dirpath,app.opt.savedir);
data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:2363:9:  [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(dirpath,BWL_PATH_SEPARATOR);
data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:2589: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(lockpath,dirpath);
data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:2590:9:  [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(lockpath,BWLOCK);
data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:3568: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(dirpath,app.opt.savedir);
data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:3569:13:  [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(dirpath,BWL_PATH_SEPARATOR);
data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:3574: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(sess->results_fname,dirpath);
data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:3575:13:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
            sprintf(&sess->results_fname[file_offset],BWL_TSTAMPFMT,
data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:3579:17:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                sprintf(&sess->results_fname[ext_offset],"%s%s",
data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:3583:17:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                sprintf(&sess->results_fname[ext_offset],"%s%s",
data/bwctl-1.5.4+dfsg1/bwctld/bwctld.c:1563:9:  [4] (shell) execlp:
  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.
        execlp(script, script, NULL);
data/bwctl-1.5.4+dfsg1/bwctld/bwctld.c:1719:9:  [4] (shell) execlp:
  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.
        execlp(script,script,"--validate",NULL);
data/bwctl-1.5.4+dfsg1/bwctld/bwctld.c:1820: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(conf_file, opts.confdir);
data/bwctl-1.5.4+dfsg1/bwctld/bwctld.c:1821:9:  [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(conf_file, BWL_PATH_SEPARATOR);
data/bwctl-1.5.4+dfsg1/bwctld/bwctld.c:1823:5:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
    strcat(conf_file, BWCTLD_CONF_FILE);
data/bwctl-1.5.4+dfsg1/bwctld/bwctld.c:1899: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(conf_file, opts.confdir);
data/bwctl-1.5.4+dfsg1/bwctld/bwctld.c:1900:9:  [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(conf_file, BWL_PATH_SEPARATOR);
data/bwctl-1.5.4+dfsg1/bwctld/bwctld.c:1902:5:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
    strcat(conf_file, BWCTLD_CONF_FILE);
data/bwctl-1.5.4+dfsg1/bwctld/bwctld.c:2324: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(pid_file, opts.vardir);
data/bwctl-1.5.4+dfsg1/bwctld/bwctld.c:2325:5:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
    strcat(pid_file, BWL_PATH_SEPARATOR);
data/bwctl-1.5.4+dfsg1/bwctld/bwctld.c:2609: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(info_file, opts.vardir);
data/bwctl-1.5.4+dfsg1/bwctld/bwctld.c:2610:9:  [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(info_file, BWL_PATH_SEPARATOR);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:675: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(tpid.user.userid,line);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:804: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(line,defline);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:911: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(fname,confdir);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:912:5:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
    strcat(fname,BWL_PATH_SEPARATOR);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:913:5:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
    strcat(fname,BWL_KEY_FILE);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:950: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(fname,confdir);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:951:5:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
    strcat(fname,BWL_PATH_SEPARATOR);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:952:5:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
    strcat(fname,BWL_LIMITS_FILE);
data/bwctl-1.5.4+dfsg1/bwlib/endpoint.c:169: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(fname,tsess->cntrl->ctx->tmpdir);
data/bwctl-1.5.4+dfsg1/bwlib/endpoint.c:170:5:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
    strcat(fname,_BWL_PATH_SEPARATOR);
data/bwctl-1.5.4+dfsg1/bwlib/endpoint.c:171:5:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
    strcat(fname,_BWL_TMPFILEFMT);
data/bwctl-1.5.4+dfsg1/bwlib/error.c:65:9:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
        vsnprintf(buff,sizeof(buff),fmt,ap);
data/bwctl-1.5.4+dfsg1/bwlib/iperf.c:351:5:  [4] (shell) execvp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    execvp(ipargs[0],ipargs);
data/bwctl-1.5.4+dfsg1/bwlib/iperf3.c:370:5:  [4] (shell) execvp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    execvp(ipargs[0],ipargs);
data/bwctl-1.5.4+dfsg1/bwlib/nuttcp.c:297:5:  [4] (shell) execvp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    execvp(ipargs[0],ipargs);
data/bwctl-1.5.4+dfsg1/bwlib/owamp.c:324:9:  [4] (shell) execvp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        execvp(ipargs[0],ipargs);
data/bwctl-1.5.4+dfsg1/bwlib/paris-traceroute.c:253:9:  [4] (shell) execvp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        execvp(ipargs[0],ipargs);
data/bwctl-1.5.4+dfsg1/bwlib/ping.c:306:9:  [4] (shell) execvp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        execvp(ipargs[0],ipargs);
data/bwctl-1.5.4+dfsg1/bwlib/tools.c:299:20:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
            (void) strcat( names, name );
data/bwctl-1.5.4+dfsg1/bwlib/tracepath.c:289:9:  [4] (shell) execvp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        execvp(ipargs[0],ipargs);
data/bwctl-1.5.4+dfsg1/bwlib/traceroute.c:294:9:  [4] (shell) execvp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        execvp(ipargs[0],ipargs);
data/bwctl-1.5.4+dfsg1/bwlib/util.c:125: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(chmem,pspec);
data/bwctl-1.5.4+dfsg1/bwlib/util.c:318:9:  [4] (shell) execvp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        execvp(command,argv);
data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:1299:23:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    if( !(conf_file = getenv("BWCTLRC"))){
data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:1302:22:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
        if( !(home = getenv("HOME"))){
data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:2175:17:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
    while((ch = getopt_long(argc, argv, opt_str, opt_list, &opt_index)) != -1){
data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:2397:8:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    if(getenv("BWCTL_DEBUG_CHILDWAIT")){
data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:2561:5:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    srand( (unsigned) time(NULL) * getpid());
data/bwctl-1.5.4+dfsg1/bwctld/bwctld.c:2162:17:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
    while((ch = getopt(argc, argv, optstring)) != -1){
data/bwctl-1.5.4+dfsg1/bwctld/bwctld.c:2191:17:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
    while((ch = getopt(argc, argv, optstring)) != -1){
data/bwctl-1.5.4+dfsg1/bwctld/bwctld.c:2244:18:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
    while ((ch = getopt(argc, argv, optstring)) != -1){
data/bwctl-1.5.4+dfsg1/bwctld/bwctld.c:2355:8:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    if(getenv("BWCTL_DEBUG_CHILDWAIT")){
data/bwctl-1.5.4+dfsg1/bwlib/context.c:690:19:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    if( (tmpdir = getenv("TMPDIR")))
data/bwctl-1.5.4+dfsg1/bwlib/missing_getopt.c:42:29:  [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.
#define IS_POSIXLY_CORRECT (getenv("POSIXLY_CORRECT") != NULL)
data/bwctl-1.5.4+dfsg1/bwlib/time.c:159:21:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    if( !(toffstr = getenv("BWCTL_DEBUG_TIMEOFFSET"))){
data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:536:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buf[50];
data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:600: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(key_ret,current_auth->aesbuff,sizeof(current_auth->aesbuff));
data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:742: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(!(fp = fopen(auth->keyfile,"r"))){
data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:769:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char        ppbuf[MAX_PASSPHRASE];
data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:770:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char        prompt[MAX_PASSPROMPT];
data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:1289: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    conf_filebuf[MAXPATHLEN+1];
data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:1291: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    keybuf[MAXPATHLEN],valbuf[MAXPATHLEN];
data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:1327:18:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if( !(conf = fopen(conf_file, "r"))){
data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:2092: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                lockpath[PATH_MAX];
data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:2099: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                opt_str[128];
data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:2101: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                cwd[PATH_MAX];
data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:2104: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                dirpath[PATH_MAX];
data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:2528:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                char    buf[BWL_MAX_TOOLNAME + 20];
data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:2535:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                char buf[1024];
data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:2591:18:  [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).
        lockfd = open(lockpath,O_RDWR|O_CREAT,S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:2811:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char temp[1024];
data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:2933: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[1024];
data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:3158: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(&client_sess->tspec,test_options,sizeof(*test_options));
data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:3159: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(&server_sess->tspec,test_options,sizeof(*test_options));
data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:3565:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char dirpath[PATH_MAX];
data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:3587:37:  [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(!(sess->results_fp = fopen(sess->results_fname,"w"))){
data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:3594:37:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
            if(!(sess->results_fp = tmpfile())){
data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:3618:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char tmpbuf[1024];
data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:3717:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char temp_str[1024];
data/bwctl-1.5.4+dfsg1/bwctl/bwctlP.h:119: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                results_fname[PATH_MAX];
data/bwctl-1.5.4+dfsg1/bwctl/bwctlP.h:237: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		fname[PATH_MAX];
data/bwctl-1.5.4+dfsg1/bwctld/bwctld.c:304: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(res->sid,sid,sizeof(BWLSID));
data/bwctl-1.5.4+dfsg1/bwctld/bwctld.c:1030:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char            sender[46];
data/bwctl-1.5.4+dfsg1/bwctld/bwctld.c:1031:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char            receiver[46];
data/bwctl-1.5.4+dfsg1/bwctld/bwctld.c:1528: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[1024];
data/bwctl-1.5.4+dfsg1/bwctld/bwctld.c:1691: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[1024];
data/bwctl-1.5.4+dfsg1/bwctld/bwctld.c:1800: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    conf_file[MAXPATHLEN+1];
data/bwctl-1.5.4+dfsg1/bwctld/bwctld.c:1801: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    keybuf[MAXPATHLEN],valbuf[MAXPATHLEN];
data/bwctl-1.5.4+dfsg1/bwctld/bwctld.c:1825: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(!(conf = fopen(conf_file, "r"))){
data/bwctl-1.5.4+dfsg1/bwctld/bwctld.c:1878: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    conf_file[MAXPATHLEN+1];
data/bwctl-1.5.4+dfsg1/bwctld/bwctld.c:1879: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    keybuf[MAXPATHLEN],valbuf[MAXPATHLEN];
data/bwctl-1.5.4+dfsg1/bwctld/bwctld.c:1904: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(!(conf = fopen(conf_file, "r"))){
data/bwctl-1.5.4+dfsg1/bwctld/bwctld.c:2094: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                pid_file[MAXPATHLEN];
data/bwctl-1.5.4+dfsg1/bwctld/bwctld.c:2095: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                info_file[MAXPATHLEN];
data/bwctl-1.5.4+dfsg1/bwctld/bwctld.c:2326:5:  [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(pid_file, "bwctld.pid");
data/bwctl-1.5.4+dfsg1/bwctld/bwctld.c:2327:19:  [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 ((pid_fd = open(pid_file, O_RDWR|O_CREAT,
data/bwctl-1.5.4+dfsg1/bwctld/bwctld.c:2536:35:  [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(close(rc) == -1 || open("/dev/null",O_RDWR) != rc){
data/bwctl-1.5.4+dfsg1/bwctld/bwctld.c:2611: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(info_file, "bwctld.info");
data/bwctl-1.5.4+dfsg1/bwctld/bwctld.c:2612:24:  [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 ((info_fp = fopen(info_file, "w")) == NULL) {
data/bwctl-1.5.4+dfsg1/bwctld/bwctldP.h:54: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	    cwd[MAXPATHLEN];
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:121:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(val.dptr,tkey,sizeof(tkey));
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:470: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(node,&tnode,sizeof(*node));
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:472:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(node->limits,limtemp,sizeof(BWLDLimRec)*tnode.ilim);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:473:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(node->used,limtemp,sizeof(BWLDLimRec)*tnode.ilim);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:581:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(tpid.net.addrval,
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:586:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(tpid.net.addrval,
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:594:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(tpid.net.addrval,&saddr4->sin_addr.s_addr,4);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:704: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(pid,&tpid,sizeof(*pid));
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:854: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			fname[MAXPATHLEN+1];
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:914:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if(!(fp = fopen(fname,"r")) && (errno != ENOENT)){
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:954:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if(!(fp = fopen(fname,"r"))){
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:1047: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(key_ret,val.dptr,val.dsize);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:1123:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(pid.net.addrval,
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:1128:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(pid.net.addrval,saddr6->sin6_addr.s6_addr,16);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:1135:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(pid.net.addrval,&saddr4->sin_addr.s_addr,4);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:1621:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&buf[0],&mesg,4);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:1623:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&buf[4],&mesg,4);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:1629:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&buf[len],&mesg,4);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:1722: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(&lim_ret->value,&buf[2],8);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:1747:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&buf[4],&lim.value,8);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:1780: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[156];
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:1795: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(&mark,&buf[152],4);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:1799: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(sid,&buf[0],16);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:1800: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(req_time,&buf[16],8);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:1801: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(fuzz_time,&buf[24],8);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:1802: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(last_time,&buf[32],8);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:1803: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(duration,&buf[40],4);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:1804: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(rtt_time,&buf[44],8);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:1805: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(recv_port,&buf[52],2);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:1806: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(tool_id,&buf[56],4);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:1807: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(sender,&buf[60],46);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:1808: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(receiver,&buf[106],46);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:1841: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[24];
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:1849:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&buf[0],&mark,4);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:1850:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&buf[20],&mark,4);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:1853:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&buf[4],&mesg,4);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:1856:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&buf[8],&reservation,8);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:1857:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&buf[16],&toolport,2);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:1877: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[24];
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:1894: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(&mesg,&buf[4],4);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:1895: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(reservation_ret,&buf[8],8);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:1896: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(tool_port_ret,&buf[16],2);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:1918: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[164];
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:1921: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        sender_str[46]; // INET6_ADDRSTRLEN
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:1922: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        receiver_str[46];
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:1934:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&buf[0],&val,4);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:1935:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&buf[160],&val,4);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:1937:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&buf[4],&val,4);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:1938:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&buf[8],sid,16);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:1939:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&buf[24],&req_time,8);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:1940:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&buf[32],&fuzz_time,8);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:1941:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&buf[40],&last_time,8);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:1942:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&buf[48],&duration,4);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:1943:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&buf[52],&rtt_time,8);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:1944:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&buf[60],toolport,2);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:1946:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&buf[64],&tool,4);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:1947:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&buf[68],sender_str,46);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:1948:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&buf[114],receiver_str,46);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:1991: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(sid,&buf[0],16);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:2015:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&buf[2],sid,16);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:2016:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&buf[6],&aval,4);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:2239: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(tinfo->sid,sid,sizeof(BWLSID));
data/bwctl-1.5.4+dfsg1/bwlib/api.c:327: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(&test->test_spec,test_spec,sizeof(BWLTestSpec));
data/bwctl-1.5.4+dfsg1/bwlib/api.c:466: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(&tsession->sid[0],aptr,4);
data/bwctl-1.5.4+dfsg1/bwlib/bwlib.h:326: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.
typedef char        BWLUserID[BWL_USERID_LEN+1];    /* add 1 for '\0' */
data/bwctl-1.5.4+dfsg1/bwlib/bwlibP.h:264:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char                      name[BWL_MAX_TOOLNAME];
data/bwctl-1.5.4+dfsg1/bwlib/bwlibP.h:308:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char                tmpdir[PATH_MAX+1];
data/bwctl-1.5.4+dfsg1/bwlib/bwlibP.h:750:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char        fname_ret[PATH_MAX+1]
data/bwctl-1.5.4+dfsg1/bwlib/capi.c:282:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char            remotenode[NI_MAXHOST],remoteserv[NI_MAXSERV];
data/bwctl-1.5.4+dfsg1/bwlib/capi.c:285:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char            localnode[NI_MAXHOST],localserv[NI_MAXSERV];
data/bwctl-1.5.4+dfsg1/bwlib/capi.c:573:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buf[255];
data/bwctl-1.5.4+dfsg1/bwlib/capi.c:599:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        unsigned char	buf[32];
data/bwctl-1.5.4+dfsg1/bwlib/capi.c:604:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(buf,challenge,16);
data/bwctl-1.5.4+dfsg1/bwlib/capi.c:617:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(&buf[16],cntrl->session_key,16);
data/bwctl-1.5.4+dfsg1/bwlib/capi.c:1018:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(tsession->sid,sid,sizeof(BWLSID));
data/bwctl-1.5.4+dfsg1/bwlib/capi.c:1048:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(sid,tsession->sid,sizeof(BWLSID));
data/bwctl-1.5.4+dfsg1/bwlib/context.c:154: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                    key[_BWL_CONTEXT_MAX_KEYLEN+1];
data/bwctl-1.5.4+dfsg1/bwlib/context.c:453: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				kval[_BWL_CONTEXT_MAX_KEYLEN+1];
data/bwctl-1.5.4+dfsg1/bwlib/context.c:588: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	kval[_BWL_CONTEXT_MAX_KEYLEN+1];
data/bwctl-1.5.4+dfsg1/bwlib/endpoint.c:165: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    fname[PATH_MAX+1];
data/bwctl-1.5.4+dfsg1/bwlib/endpoint.c:173:14:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
    if((fd = mkstemp(fname)) < 0){
data/bwctl-1.5.4+dfsg1/bwlib/endpoint.c:223: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                    nodebuff[MAXHOSTNAMELEN];
data/bwctl-1.5.4+dfsg1/bwlib/endpoint.c:273:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(&sbuff,lsaddr,lsaddrlen);
data/bwctl-1.5.4+dfsg1/bwlib/endpoint.c:392: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(key_ret,sidbytes,sizeof(BWLKey));
data/bwctl-1.5.4+dfsg1/bwlib/endpoint.c:460: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                addr_str[INET6_ADDRSTRLEN];
data/bwctl-1.5.4+dfsg1/bwlib/endpoint.c:465:19:  [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( (nullfd = open(_BWL_DEV_NULL,O_RDONLY)) < 0){
data/bwctl-1.5.4+dfsg1/bwlib/endpoint.c:611: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                nambuf[MAXHOSTNAMELEN+8]; /* 8 chars for '[]:port\0' */
data/bwctl-1.5.4+dfsg1/bwlib/endpoint.c:613: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                addr_str[INET6_ADDRSTRLEN];
data/bwctl-1.5.4+dfsg1/bwlib/endpoint.c:904:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char                local_addr_str[1024];
data/bwctl-1.5.4+dfsg1/bwlib/endpoint.c:906:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char                remote_addr_str[1024];
data/bwctl-1.5.4+dfsg1/bwlib/error.c:63:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char		buff[_BWL_ERR_MAXSTRING];
data/bwctl-1.5.4+dfsg1/bwlib/iperf.c:60:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char            buf[1024];
data/bwctl-1.5.4+dfsg1/bwlib/iperf.c:163: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 *IperfArgs[_BWL_MAX_TOOLARGS*2];
data/bwctl-1.5.4+dfsg1/bwlib/iperf.c:173: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            recvhost[MAXHOSTNAMELEN];
data/bwctl-1.5.4+dfsg1/bwlib/iperf.c:174: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            sendhost[MAXHOSTNAMELEN];
data/bwctl-1.5.4+dfsg1/bwlib/iperf.c:237:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char temp[2];
data/bwctl-1.5.4+dfsg1/bwlib/iperf3.c:58: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[1024];
data/bwctl-1.5.4+dfsg1/bwlib/iperf3.c:163: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 *Iperf3Args[_BWL_MAX_TOOLARGS*2];
data/bwctl-1.5.4+dfsg1/bwlib/iperf3.c:173: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            recvhost[MAXHOSTNAMELEN];
data/bwctl-1.5.4+dfsg1/bwlib/iperf3.c:174: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            sendhost[MAXHOSTNAMELEN];
data/bwctl-1.5.4+dfsg1/bwlib/iperf3.c:234:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char temp[2];
data/bwctl-1.5.4+dfsg1/bwlib/nuttcp.c:56: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            confkey[BWL_MAX_TOOLNAME + 10];
data/bwctl-1.5.4+dfsg1/bwlib/nuttcp.c:61: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[1024];
data/bwctl-1.5.4+dfsg1/bwlib/nuttcp.c:67:5:  [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(confkey,"V.");
data/bwctl-1.5.4+dfsg1/bwlib/nuttcp.c:141: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 *NuttcpArgs[_BWL_MAX_TOOLARGS*2];
data/bwctl-1.5.4+dfsg1/bwlib/nuttcp.c:148:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char            confkey[BWL_MAX_TOOLNAME + 10];
data/bwctl-1.5.4+dfsg1/bwlib/nuttcp.c:152: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            recvhost[MAXHOSTNAMELEN];
data/bwctl-1.5.4+dfsg1/bwlib/nuttcp.c:167:5:  [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(confkey,"V.");
data/bwctl-1.5.4+dfsg1/bwlib/owamp.c:69: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[1024];
data/bwctl-1.5.4+dfsg1/bwlib/owamp.c:138: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 *OwampArgs[_BWL_MAX_TOOLARGS*2];
data/bwctl-1.5.4+dfsg1/bwlib/owamp.c:147: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            addr_str[INET6_ADDRSTRLEN];
data/bwctl-1.5.4+dfsg1/bwlib/owamp.c:148:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char            server_str[1024];
data/bwctl-1.5.4+dfsg1/bwlib/owamp.c:149: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            port_range[1024];
data/bwctl-1.5.4+dfsg1/bwlib/owamp.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.
        char buf[1024];
data/bwctl-1.5.4+dfsg1/bwlib/paris-traceroute.c:63: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[1024];
data/bwctl-1.5.4+dfsg1/bwlib/paris-traceroute.c:112: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 *ParisTracerouteArgs[_BWL_MAX_TOOLARGS*2];
data/bwctl-1.5.4+dfsg1/bwlib/paris-traceroute.c:124: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            addr_str[INET6_ADDRSTRLEN];
data/bwctl-1.5.4+dfsg1/bwlib/ping.c:66: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[1024];
data/bwctl-1.5.4+dfsg1/bwlib/ping.c:132: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 *PingArgs[_BWL_MAX_TOOLARGS*2];
data/bwctl-1.5.4+dfsg1/bwlib/ping.c:146: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            addr_str[INET6_ADDRSTRLEN];
data/bwctl-1.5.4+dfsg1/bwlib/protocol.c:95:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&buf[16],challenge,16);
data/bwctl-1.5.4+dfsg1/bwlib/protocol.c:141:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(challenge,&buf[16],16);
data/bwctl-1.5.4+dfsg1/bwlib/protocol.c:207:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(&buf[4],cntrl->userid,16);
data/bwctl-1.5.4+dfsg1/bwlib/protocol.c:208:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(&buf[20],token,32);
data/bwctl-1.5.4+dfsg1/bwlib/protocol.c:209:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(&buf[52],cntrl->writeIV,16);
data/bwctl-1.5.4+dfsg1/bwlib/protocol.c:261:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(cntrl->userid_buffer,&buf[4],16);
data/bwctl-1.5.4+dfsg1/bwlib/protocol.c:262: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(token,&buf[20],32);
data/bwctl-1.5.4+dfsg1/bwlib/protocol.c:263: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(clientIV,&buf[52],16);
data/bwctl-1.5.4+dfsg1/bwlib/protocol.c:348:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&buf[16],cntrl->writeIV,16);
data/bwctl-1.5.4+dfsg1/bwlib/protocol.c:430: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(cntrl->readIV,&buf[16],16);
data/bwctl-1.5.4+dfsg1/bwlib/protocol.c:962:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(&buf[28],saddr6->sin6_addr.s6_addr,16);
data/bwctl-1.5.4+dfsg1/bwlib/protocol.c:966:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(&buf[44],saddr6->sin6_addr.s6_addr,16);
data/bwctl-1.5.4+dfsg1/bwlib/protocol.c:989:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&buf[60],tsession->sid,16);
data/bwctl-1.5.4+dfsg1/bwlib/protocol.c:1321: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(sid,&buf[60],16);
data/bwctl-1.5.4+dfsg1/bwlib/protocol.c:1393:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(saddr6->sin6_addr.s6_addr,&buf[28],16);
data/bwctl-1.5.4+dfsg1/bwlib/protocol.c:1399:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(saddr6->sin6_addr.s6_addr,&buf[44],16);
data/bwctl-1.5.4+dfsg1/bwlib/protocol.c:1522:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(tsession->sid,&buf[60],16);
data/bwctl-1.5.4+dfsg1/bwlib/protocol.c:1691:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&buf[4],tsession->sid,16);
data/bwctl-1.5.4+dfsg1/bwlib/protocol.c:1749:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(tsession->sid,&buf[4],16);
data/bwctl-1.5.4+dfsg1/bwlib/rijndael-api-fst.c:154: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(binIV, iv, 16); 
data/bwctl-1.5.4+dfsg1/bwlib/rijndael-api-fst.c:184: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(binIV, input, 16);
data/bwctl-1.5.4+dfsg1/bwlib/rijndael-api-fst.c:185: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(outBuffer, block, 16);
data/bwctl-1.5.4+dfsg1/bwlib/sapi.c:255: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            remotenode[NI_MAXHOST],remoteserv[NI_MAXSERV];
data/bwctl-1.5.4+dfsg1/bwlib/sapi.c:258: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            localnode[NI_MAXHOST],localserv[NI_MAXSERV];
data/bwctl-1.5.4+dfsg1/bwlib/sapi.c:476:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(cntrl->session_key,&token[16],16);
data/bwctl-1.5.4+dfsg1/bwlib/thrulay.c:93: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    recvhost[MAXHOSTNAMELEN];
data/bwctl-1.5.4+dfsg1/bwlib/time.c:439:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&buf[0],&t32,4);
data/bwctl-1.5.4+dfsg1/bwlib/time.c:448:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&buf[4],&t32,4);
data/bwctl-1.5.4+dfsg1/bwlib/time.c:542: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(&t32,&buf[0],4);
data/bwctl-1.5.4+dfsg1/bwlib/time.c:550: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(&t32,&buf[4],4);
data/bwctl-1.5.4+dfsg1/bwlib/tools.c:285: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 names[BWL_MAX_TOOLNAME*10]; /* enough to hold all names */
data/bwctl-1.5.4+dfsg1/bwlib/tools.c:286: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 unknown[BWL_MAX_TOOLNAME];
data/bwctl-1.5.4+dfsg1/bwlib/tools.c:296:24:  [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.
                (void) sprintf( unknown, "unknown(id=%x)", tid );
data/bwctl-1.5.4+dfsg1/bwlib/tools.c:460:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char confkey[BWL_MAX_TOOLNAME + 20];
data/bwctl-1.5.4+dfsg1/bwlib/tools.c:600: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    optname[BWL_MAX_TOOLNAME + 12];
data/bwctl-1.5.4+dfsg1/bwlib/tools.c:613:5:  [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(optname,"V.");
data/bwctl-1.5.4+dfsg1/bwlib/tools.c:628: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            optname[BWL_MAX_TOOLNAME + 12];
data/bwctl-1.5.4+dfsg1/bwlib/tools.c:643:5:  [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(optname,"V.");
data/bwctl-1.5.4+dfsg1/bwlib/tools.c:659: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        confkey[BWL_MAX_TOOLNAME + 20];
data/bwctl-1.5.4+dfsg1/bwlib/tools.c:768: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            optname[BWL_MAX_TOOLNAME + 12];
data/bwctl-1.5.4+dfsg1/bwlib/tools.c:772:5:  [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(optname,"V.");
data/bwctl-1.5.4+dfsg1/bwlib/tools.c:971: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[1024];
data/bwctl-1.5.4+dfsg1/bwlib/tools.c:999: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 confkey[1024];
data/bwctl-1.5.4+dfsg1/bwlib/tracepath.c:66: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[1024];
data/bwctl-1.5.4+dfsg1/bwlib/tracepath.c:177: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 *TracepathArgs[_BWL_MAX_TOOLARGS*2];
data/bwctl-1.5.4+dfsg1/bwlib/tracepath.c:189: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            addr_str[INET6_ADDRSTRLEN];
data/bwctl-1.5.4+dfsg1/bwlib/traceroute.c:66: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[1024];
data/bwctl-1.5.4+dfsg1/bwlib/traceroute.c:137: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 *TracerouteArgs[_BWL_MAX_TOOLARGS*2];
data/bwctl-1.5.4+dfsg1/bwlib/traceroute.c:151: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            addr_str[INET6_ADDRSTRLEN];
data/bwctl-1.5.4+dfsg1/bwlib/util.c:117: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        chmem[BWL_MAX_TOOLNAME];
data/bwctl-1.5.4+dfsg1/bwlib/util.c:204: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    nbuf[100];
data/bwctl-1.5.4+dfsg1/bwlib/util.c:238: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    nbuf[100];
data/bwctl-1.5.4+dfsg1/bwlib/util.c:308:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buf[1024];
data/bwctl-1.5.4+dfsg1/bwlib/util.c:430:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char temp_address[1024];
data/bwctl-1.5.4+dfsg1/bwlib/util.c:432:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char temp_port[10];
data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:552:13:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is low because the source is a
  constant string.
            strncat(buf, " <", sizeof(buf) - strlen(buf) - 1);
data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:552: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).
            strncat(buf, " <", sizeof(buf) - strlen(buf) - 1);
data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:553:13:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
            strncat(buf, bwctl_options[i].argument_description, sizeof(buf) - strlen(buf) - 1);
data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:553:79:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            strncat(buf, bwctl_options[i].argument_description, sizeof(buf) - strlen(buf) - 1);
data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:554:13:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is low because the source is a
  constant character.
            strncat(buf, ">", sizeof(buf) - strlen(buf) - 1);
data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:554:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            strncat(buf, ">", sizeof(buf) - strlen(buf) - 1);
data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:786: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).
        pplen = strlen(passphrase);
data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:1313: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).
        rc = strlen(home) + strlen(BWL_PATH_SEPARATOR) +
data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:1313: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).
        rc = strlen(home) + strlen(BWL_PATH_SEPARATOR) +
data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:1314:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            strlen(BWCTL_DEFAULT_RCNAME);
data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:1637:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            if(strlen(value) != 1){
data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:1843:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            if(strlen(value) != 1){
data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:2354:55:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    fname_len = BWL_TSTAMPCHARS + DIRECTION_EXT_LEN + strlen(BWL_FILE_EXT);
data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:2357:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if((strlen(app.opt.savedir) + strlen(BWL_PATH_SEPARATOR)+
data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:2357: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((strlen(app.opt.savedir) + strlen(BWL_PATH_SEPARATOR)+
data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:3571:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            file_offset = strlen(dirpath);
data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:3723:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(temp_str, schedule, sizeof(temp_str) - 1);
data/bwctl-1.5.4+dfsg1/bwctl/bwctl.c:3753:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(temp_str, schedule, sizeof(temp_str) - 1);
data/bwctl-1.5.4+dfsg1/bwctld/bwctld.c:1764:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if( (rc = read(fdpipe[0],buf,buf_size-1)) > 0){
data/bwctl-1.5.4+dfsg1/bwctld/bwctld.c:1776:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if(0 == strncmp(buf,pattern,strlen(pattern))){
data/bwctl-1.5.4+dfsg1/bwctld/bwctld.c:1808: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).
    rc = strlen(BWCTLD_CONF_FILE);
data/bwctl-1.5.4+dfsg1/bwctld/bwctld.c:1814: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).
        rc += strlen(opts.confdir) + strlen(BWL_PATH_SEPARATOR);
data/bwctl-1.5.4+dfsg1/bwctld/bwctld.c:1814: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).
        rc += strlen(opts.confdir) + strlen(BWL_PATH_SEPARATOR);
data/bwctl-1.5.4+dfsg1/bwctld/bwctld.c:1887: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).
    rc = strlen(BWCTLD_CONF_FILE);
data/bwctl-1.5.4+dfsg1/bwctld/bwctld.c:1893: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).
        rc += strlen(opts.confdir) + strlen(BWL_PATH_SEPARATOR);
data/bwctl-1.5.4+dfsg1/bwctld/bwctld.c:1893: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).
        rc += strlen(opts.confdir) + strlen(BWL_PATH_SEPARATOR);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:96: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).
        key.dsize = strlen(username);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:222: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).
    key.dsize = strlen(cname);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:314: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).
            key.dsize = strlen(limval);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:333: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).
                        strlen(limkeys[i].lname)+1)){
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:480: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).
    key.dsize = strlen(node->nodename);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:665: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).
        key.dsize = strlen(line);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:692: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).
    key.dsize = strlen(line);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:898: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(BWL_KEY_FILE);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:905:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len += strlen(confdir) + strlen(BWL_PATH_SEPARATOR);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:905: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).
    len += strlen(confdir) + strlen(BWL_PATH_SEPARATOR);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:937: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(BWL_LIMITS_FILE);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:944:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len += strlen(confdir) + strlen(BWL_PATH_SEPARATOR);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:944: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).
    len += strlen(confdir) + strlen(BWL_PATH_SEPARATOR);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:1040: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).
    key.dsize = strlen(userid);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:1624: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(node->nodename);
data/bwctl-1.5.4+dfsg1/bwctld/policy.c:1626:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy((char*)&buf[8],node->nodename,(size_t)len);
data/bwctl-1.5.4+dfsg1/bwlib/capi.c:513:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(cntrl->userid_buffer,userid,
data/bwctl-1.5.4+dfsg1/bwlib/capi.c:576:3:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is low because the source is a
  constant string.
		strncat(buf, " open", sizeof(buf) - strlen(buf) - 1);
data/bwctl-1.5.4+dfsg1/bwlib/capi.c:576: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).
		strncat(buf, " open", sizeof(buf) - strlen(buf) - 1);
data/bwctl-1.5.4+dfsg1/bwlib/capi.c:578:3:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is low because the source is a
  constant string.
		strncat(buf, " authenticated", sizeof(buf) - strlen(buf) - 1);
data/bwctl-1.5.4+dfsg1/bwlib/capi.c:578: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).
		strncat(buf, " authenticated", sizeof(buf) - strlen(buf) - 1);
data/bwctl-1.5.4+dfsg1/bwlib/capi.c:580:3:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is low because the source is a
  constant string.
		strncat(buf, " encrypted", sizeof(buf) - strlen(buf) - 1);
data/bwctl-1.5.4+dfsg1/bwlib/capi.c:580:44:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		strncat(buf, " encrypted", sizeof(buf) - strlen(buf) - 1);
data/bwctl-1.5.4+dfsg1/bwlib/context.c:359: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).
    assert(strlen(key) < _BWL_CONTEXT_MAX_KEYLEN);
data/bwctl-1.5.4+dfsg1/bwlib/context.c:368:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(rec->key,key,_BWL_CONTEXT_MAX_KEYLEN);
data/bwctl-1.5.4+dfsg1/bwlib/context.c:372: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).
    k.dsize = strlen(rec->key);
data/bwctl-1.5.4+dfsg1/bwlib/context.c:458:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(kval,key,_BWL_CONTEXT_MAX_KEYLEN);
data/bwctl-1.5.4+dfsg1/bwlib/context.c:460: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).
    k.dsize = strlen(kval);
data/bwctl-1.5.4+dfsg1/bwlib/context.c:593:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(kval,key,_BWL_CONTEXT_MAX_KEYLEN);
data/bwctl-1.5.4+dfsg1/bwlib/context.c:595: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).
    k.dsize = strlen(kval);
data/bwctl-1.5.4+dfsg1/bwlib/context.c:691:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(ctx->tmpdir,tmpdir,PATH_MAX);
data/bwctl-1.5.4+dfsg1/bwlib/context.c:693:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(ctx->tmpdir,_BWL_DEFAULT_TMPDIR,PATH_MAX);
data/bwctl-1.5.4+dfsg1/bwlib/context.c:695: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).
    if(strlen(ctx->tmpdir) + strlen(_BWL_PATH_SEPARATOR) +
data/bwctl-1.5.4+dfsg1/bwlib/context.c:695: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(strlen(ctx->tmpdir) + strlen(_BWL_PATH_SEPARATOR) +
data/bwctl-1.5.4+dfsg1/bwlib/context.c:696:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            strlen(_BWL_TMPFILEFMT) > PATH_MAX){
data/bwctl-1.5.4+dfsg1/bwlib/error.c:66:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        fwrite(buff,sizeof(char),strlen(buff),stderr);
data/bwctl-1.5.4+dfsg1/bwlib/iperf.c:75:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if(0 == strncmp(buf,pattern,strlen(pattern))){
data/bwctl-1.5.4+dfsg1/bwlib/iperf3.c:74:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        for(i = 0; i < strlen(buf); i++) {
data/bwctl-1.5.4+dfsg1/bwlib/iperf3.c:77:53:  [1] (buffer) strlen:
  Does not handle 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(0 == strncmp(buf + i,patterns[j],strlen(patterns[j]))){
data/bwctl-1.5.4+dfsg1/bwlib/missing_getopt.c:313: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).
			current_argv_len = strlen(current_argv);
data/bwctl-1.5.4+dfsg1/bwlib/missing_getopt.c:321: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).
			if (strlen(long_options[i].name) ==
data/bwctl-1.5.4+dfsg1/bwlib/nuttcp.c:68:5:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
    strncat(confkey,tool->name,sizeof(confkey) - strlen(confkey) - 1);
data/bwctl-1.5.4+dfsg1/bwlib/nuttcp.c:68:50:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    strncat(confkey,tool->name,sizeof(confkey) - strlen(confkey) - 1);
data/bwctl-1.5.4+dfsg1/bwlib/nuttcp.c:69:5:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is low because the source is a
  constant string.
    strncat(confkey,"_cmd",sizeof(confkey) - strlen(confkey) - 1);
data/bwctl-1.5.4+dfsg1/bwlib/nuttcp.c:69: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).
    strncat(confkey,"_cmd",sizeof(confkey) - strlen(confkey) - 1);
data/bwctl-1.5.4+dfsg1/bwlib/nuttcp.c:86:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if(0 == strncmp(buf,pattern,strlen(pattern))){
data/bwctl-1.5.4+dfsg1/bwlib/nuttcp.c:168:5:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
    strncat(confkey,tsess->tool->name,sizeof(confkey) - strlen(confkey) - 1);
data/bwctl-1.5.4+dfsg1/bwlib/nuttcp.c:168:57:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    strncat(confkey,tsess->tool->name,sizeof(confkey) - strlen(confkey) - 1);
data/bwctl-1.5.4+dfsg1/bwlib/nuttcp.c:169:5:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is low because the source is a
  constant string.
    strncat(confkey,"_cmd",sizeof(confkey) - strlen(confkey) - 1);
data/bwctl-1.5.4+dfsg1/bwlib/nuttcp.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).
    strncat(confkey,"_cmd",sizeof(confkey) - strlen(confkey) - 1);
data/bwctl-1.5.4+dfsg1/bwlib/paris-traceroute.c:297: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(!strncasecmp(key,"paris_traceroute_cmd",strlen(key))){
data/bwctl-1.5.4+dfsg1/bwlib/ping.c:350: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(!strncasecmp(key,"ping_cmd",strlen(key))){
data/bwctl-1.5.4+dfsg1/bwlib/ping.c:354:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if(!strncasecmp(key,"ping6_cmd",strlen(key))){
data/bwctl-1.5.4+dfsg1/bwlib/tools.c:135:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if( strlen(tool_list[i].tool->name)){
data/bwctl-1.5.4+dfsg1/bwlib/tools.c:151:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if( strlen(tool_list[i].tool->name)){
data/bwctl-1.5.4+dfsg1/bwlib/tools.c:169: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).
                        strlen(ctx->tool_list[i].tool->name)+1) == 0)){
data/bwctl-1.5.4+dfsg1/bwlib/tools.c:300:20:  [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.
            (void) strcat( names, " " );
data/bwctl-1.5.4+dfsg1/bwlib/tools.c:614:5:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
    strncat(optname,key,sizeof(optname) - strlen(optname) - 1);
data/bwctl-1.5.4+dfsg1/bwlib/tools.c:614:43:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    strncat(optname,key,sizeof(optname) - strlen(optname) - 1);
data/bwctl-1.5.4+dfsg1/bwlib/tools.c:644:5:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
    strncat(optname,key,sizeof(optname) - strlen(optname) - 1);
data/bwctl-1.5.4+dfsg1/bwlib/tools.c:644:43:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    strncat(optname,key,sizeof(optname) - strlen(optname) - 1);
data/bwctl-1.5.4+dfsg1/bwlib/tools.c:662:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(confkey,tool->name,sizeof(confkey));
data/bwctl-1.5.4+dfsg1/bwlib/tools.c:663: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(confkey);
data/bwctl-1.5.4+dfsg1/bwlib/tools.c:670:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
    strncpy(&confkey[len],"_cmd",sizeof(confkey)-len);
data/bwctl-1.5.4+dfsg1/bwlib/tools.c:671: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(!strncasecmp(key,confkey,strlen(confkey))){
data/bwctl-1.5.4+dfsg1/bwlib/tools.c:675:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
    strncpy(&confkey[len],"_server_cmd",sizeof(confkey)-len);
data/bwctl-1.5.4+dfsg1/bwlib/tools.c:676: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(!strncasecmp(key,confkey,strlen(confkey))){
data/bwctl-1.5.4+dfsg1/bwlib/tools.c:680:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
    strncpy(&confkey[len],"_port",sizeof(confkey)-len);
data/bwctl-1.5.4+dfsg1/bwlib/tools.c:681: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(!strncasecmp(key,confkey,strlen(confkey))){
data/bwctl-1.5.4+dfsg1/bwlib/tools.c:695: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(!strncasecmp(key,confkey,strlen(confkey))){
data/bwctl-1.5.4+dfsg1/bwlib/tools.c:700: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(!strncasecmp(key,confkey,strlen(confkey))){
data/bwctl-1.5.4+dfsg1/bwlib/tools.c:706: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(!strncasecmp(key,confkey,strlen(confkey))){
data/bwctl-1.5.4+dfsg1/bwlib/tools.c:718: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(!strncasecmp(key,confkey,strlen(confkey))){
data/bwctl-1.5.4+dfsg1/bwlib/tools.c:730: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(!strncasecmp(key,confkey,strlen(confkey))){
data/bwctl-1.5.4+dfsg1/bwlib/tools.c:773:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(&optname[2],tool->name,sizeof(optname)-2);
data/bwctl-1.5.4+dfsg1/bwlib/tools.c:774: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(optname);
data/bwctl-1.5.4+dfsg1/bwlib/tools.c:775:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
    strncpy(&optname[len],"_port",sizeof(optname)-len);
data/bwctl-1.5.4+dfsg1/bwlib/tracepath.c:333:41:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if(!strncasecmp(key,"tracepath_cmd",strlen(key))){
data/bwctl-1.5.4+dfsg1/bwlib/tracepath.c:337: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(!strncasecmp(key,"tracepath6_cmd",strlen(key))){
data/bwctl-1.5.4+dfsg1/bwlib/traceroute.c:338: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(!strncasecmp(key,"traceroute_cmd",strlen(key))){
data/bwctl-1.5.4+dfsg1/bwlib/traceroute.c:342:43:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if(!strncasecmp(key,"traceroute6_cmd",strlen(key))){
data/bwctl-1.5.4+dfsg1/bwlib/util.c:121:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if(!pspec || (strlen(pspec) >= sizeof(chmem))){
data/bwctl-1.5.4+dfsg1/bwlib/util.c:351:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        read(fdpipe[0],output_buf,output_buf_size - 1);
data/bwctl-1.5.4+dfsg1/bwlib/util.c:675:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(cpu_affinity) == 0) {
data/bwctl-1.5.4+dfsg1/bwlib/util.c:679: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).
    for(i = 0; i < strlen(cpu_affinity); i++) {

ANALYSIS SUMMARY:

Hits = 391
Lines analyzed = 29851 in approximately 0.69 seconds (43132 lines/second)
Physical Source Lines of Code (SLOC) = 19025
Hits@level = [0] 151 [1] 111 [2] 220 [3]  12 [4]  48 [5]   0
Hits@level+ = [0+] 542 [1+] 391 [2+] 280 [3+]  60 [4+]  48 [5+]   0
Hits/KSLOC@level+ = [0+] 28.4888 [1+] 20.5519 [2+] 14.7175 [3+] 3.15375 [4+] 2.523 [5+]   0
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.