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/sdparm-1.10/lib/sg_pt_common.c
Examining data/sdparm-1.10/lib/sg_cmds_basic2.c
Examining data/sdparm-1.10/lib/sg_pt_solaris.c
Examining data/sdparm-1.10/lib/sg_lib.c
Examining data/sdparm-1.10/lib/sg_pt_freebsd.c
Examining data/sdparm-1.10/lib/sg_lib_data.c
Examining data/sdparm-1.10/lib/sg_cmds_basic.c
Examining data/sdparm-1.10/lib/sg_pt_linux.c
Examining data/sdparm-1.10/lib/sg_pt_win32.c
Examining data/sdparm-1.10/lib/sg_cmds_mmc.c
Examining data/sdparm-1.10/lib/sg_pt_osf1.c
Examining data/sdparm-1.10/lib/sg_cmds_extra.c
Examining data/sdparm-1.10/lib/sg_io_linux.c
Examining data/sdparm-1.10/include/sg_pt_win32.h
Examining data/sdparm-1.10/include/sg_lib.h
Examining data/sdparm-1.10/include/sg_cmds_basic.h
Examining data/sdparm-1.10/include/sg_linux_inc.h
Examining data/sdparm-1.10/include/sg_io_linux.h
Examining data/sdparm-1.10/include/sg_cmds_extra.h
Examining data/sdparm-1.10/include/sg_unaligned.h
Examining data/sdparm-1.10/include/sg_pr2serr.h
Examining data/sdparm-1.10/include/sg_cmds_mmc.h
Examining data/sdparm-1.10/include/sg_lib_data.h
Examining data/sdparm-1.10/include/sg_pt.h
Examining data/sdparm-1.10/include/sg_cmds.h
Examining data/sdparm-1.10/src/sdparm_vpd.c
Examining data/sdparm-1.10/src/sdparm_wscan.c
Examining data/sdparm-1.10/src/sdparm_data.c
Examining data/sdparm-1.10/src/chk_sdparm_data.c
Examining data/sdparm-1.10/src/sdparm_cmd.c
Examining data/sdparm-1.10/src/getopt_long.c
Examining data/sdparm-1.10/src/sdparm.c
Examining data/sdparm-1.10/src/sdparm_access.c
Examining data/sdparm-1.10/src/sdparm_data_vendor.c
Examining data/sdparm-1.10/src/port_getopt.h
Examining data/sdparm-1.10/src/sdparm.h

FINAL RESULTS:

data/sdparm-1.10/include/sg_pr2serr.h:15:33:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        __attribute__ ((format (printf, 1, 2)));
data/sdparm-1.10/lib/sg_cmds_basic.c:67:33:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        __attribute__ ((format (printf, 1, 2)));
data/sdparm-1.10/lib/sg_cmds_basic.c:80:9:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    n = vfprintf(sg_warnings_strm ? sg_warnings_strm : stderr, fmt, args);
data/sdparm-1.10/lib/sg_cmds_basic2.c:73:33:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        __attribute__ ((format (printf, 1, 2)));
data/sdparm-1.10/lib/sg_cmds_basic2.c:86:9:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    n = vfprintf(sg_warnings_strm ? sg_warnings_strm : stderr, fmt, args);
data/sdparm-1.10/lib/sg_cmds_extra.c:96:33:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        __attribute__ ((format (printf, 1, 2)));
data/sdparm-1.10/lib/sg_cmds_extra.c:109:9:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    n = vfprintf(sg_warnings_strm ? sg_warnings_strm : stderr, fmt, args);
data/sdparm-1.10/lib/sg_cmds_mmc.c:42:33:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        __attribute__ ((format (printf, 1, 2)));
data/sdparm-1.10/lib/sg_cmds_mmc.c:55:9:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    n = vfprintf(sg_warnings_strm ? sg_warnings_strm : stderr, fmt, args);
data/sdparm-1.10/lib/sg_io_linux.c:27:33:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        __attribute__ ((format (printf, 1, 2)));
data/sdparm-1.10/lib/sg_io_linux.c:40:9:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    n = vfprintf(sg_warnings_strm ? sg_warnings_strm : stderr, fmt, args);
data/sdparm-1.10/lib/sg_lib.c:54:33:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        __attribute__ ((format (printf, 1, 2)));
data/sdparm-1.10/lib/sg_lib.c:67:9:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    n = vfprintf(sg_warnings_strm ? sg_warnings_strm : stderr, fmt, args);
data/sdparm-1.10/lib/sg_lib.c:74:48:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
                       __attribute__ ((format (printf, 3, 4)));
data/sdparm-1.10/lib/sg_lib.c:95: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.
    n = vsnprintf(cp, cp_max_len, fmt, args);
data/sdparm-1.10/lib/sg_lib.c:2155:17:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
                fprintf(fp, formatstr, buff);
data/sdparm-1.10/lib/sg_lib.c:2189:13:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
            fprintf(fp, formatstr, buff);
data/sdparm-1.10/lib/sg_lib.c:2738:9:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    n = vfprintf(stderr, fmt, args);
data/sdparm-1.10/lib/sg_pt_freebsd.c:77:33:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        __attribute__ ((format (printf, 1, 2)));
data/sdparm-1.10/lib/sg_pt_freebsd.c:90:9:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    n = vfprintf(sg_warnings_strm ? sg_warnings_strm : stderr, fmt, args);
data/sdparm-1.10/lib/sg_pt_linux.c:91:33:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        __attribute__ ((format (printf, 1, 2)));
data/sdparm-1.10/lib/sg_pt_linux.c:104:9:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    n = vfprintf(sg_warnings_strm ? sg_warnings_strm : stderr, fmt, args);
data/sdparm-1.10/lib/sg_pt_osf1.c:67:33:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        __attribute__ ((format (printf, 1, 2)));
data/sdparm-1.10/lib/sg_pt_osf1.c:80:9:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    n = vfprintf(sg_warnings_strm ? sg_warnings_strm : stderr, fmt, args);
data/sdparm-1.10/lib/sg_pt_win32.c:105:33:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        __attribute__ ((format (printf, 1, 2)));
data/sdparm-1.10/lib/sg_pt_win32.c:118:9:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    n = vfprintf(sg_warnings_strm ? sg_warnings_strm : stderr, fmt, args);
data/sdparm-1.10/src/getopt_long.c:253:4:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
			fprintf(stderr, illoptchar, optchar);
data/sdparm-1.10/src/getopt_long.c:265:5:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
				fprintf(stderr, recargchar, optchar);
data/sdparm-1.10/src/getopt_long.c:288:6:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
					fprintf(stderr, recargchar, optchar);
data/sdparm-1.10/src/getopt_long.c:364:6:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
					fprintf(stderr, ambig, (int)current_argv_len,
data/sdparm-1.10/src/getopt_long.c:374:6:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
					fprintf(stderr, noarg, (int)current_argv_len,
data/sdparm-1.10/src/getopt_long.c:406:6:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
					fprintf(stderr, recargstring, current_argv);
data/sdparm-1.10/src/getopt_long.c:420:5:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
				fprintf(stderr, illoptstring, current_argv);
data/sdparm-1.10/src/sdparm.c:1959:17:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
                strcpy(vb, ecp + 1);
data/sdparm-1.10/src/sdparm.c:1971:17:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
                strcpy(acron, buff);
data/sdparm-1.10/src/sdparm.c:1975:17:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
                strcpy(vb, acron);
data/sdparm-1.10/src/sdparm.c:1978:17:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
                strcpy(vb, ecp + 1);
data/sdparm-1.10/src/sdparm_cmd.c:253: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(buff, pdp->desc);
data/sdparm-1.10/src/getopt_long.c:66:14:  [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.
__weak_alias(getopt_long,_getopt_long)
data/sdparm-1.10/src/getopt_long.c:73: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/sdparm-1.10/src/getopt_long.c:306:1:  [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.
getopt_long(int nargc, char * const *nargv, const char *options,
data/sdparm-1.10/src/port_getopt.h:76:5:  [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.
int getopt_long(int, char * const *, const char *,
data/sdparm-1.10/src/sdparm.c:2315:13:  [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.
        c = getopt_long(argc, argv, "6aBc:C:dDefg:hHiI:lM:np:P:qrRs:St:vVw",
data/sdparm-1.10/src/sdparm.c:2318:13:  [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.
        c = getopt_long(argc, argv, "6aBc:C:dDefg:hHiI:lM:np:P:qrRs:St:vV",
data/sdparm-1.10/include/sg_cmds_basic.h:178: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 vendor[9];             /* T10 field is 8 bytes, NUL char appended */
data/sdparm-1.10/include/sg_cmds_basic.h:179: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 product[17];
data/sdparm-1.10/include/sg_cmds_basic.h:180: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 revision[5];
data/sdparm-1.10/lib/sg_cmds_basic.c:122: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 b[512];
data/sdparm-1.10/lib/sg_cmds_basic.c:182:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char b[1024];
data/sdparm-1.10/lib/sg_cmds_basic.c:315:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char inqCmdBlk[INQUIRY_CMDLEN] = {INQUIRY_CMD, 0, 0, 0, 0, 0};
data/sdparm-1.10/lib/sg_cmds_basic.c:316:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char sense_b[SENSE_BUFF_LEN];
data/sdparm-1.10/lib/sg_cmds_basic.c:391:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char inqCmdBlk[INQUIRY_CMDLEN] = {INQUIRY_CMD, 0, 0, 0, 0, 0};
data/sdparm-1.10/lib/sg_cmds_basic.c:392:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char sense_b[SENSE_BUFF_LEN];
data/sdparm-1.10/lib/sg_cmds_basic.c:393:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char inq_resp[SAFE_STD_INQ_RESP_LEN];
data/sdparm-1.10/lib/sg_cmds_basic.c:449: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(inq_data->vendor, inq_resp + 8, 8);
data/sdparm-1.10/lib/sg_cmds_basic.c:450: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(inq_data->product, inq_resp + 16, 16);
data/sdparm-1.10/lib/sg_cmds_basic.c:451: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(inq_data->revision, inq_resp + 32, 4);
data/sdparm-1.10/lib/sg_cmds_basic.c:468:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char turCmdBlk[TUR_CMDLEN] = {TUR_CMD, 0, 0, 0, 0, 0};
data/sdparm-1.10/lib/sg_cmds_basic.c:469:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char sense_b[SENSE_BUFF_LEN];
data/sdparm-1.10/lib/sg_cmds_basic.c:533:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char rsCmdBlk[REQUEST_SENSE_CMDLEN] =
data/sdparm-1.10/lib/sg_cmds_basic.c:535:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char sense_b[SENSE_BUFF_LEN];
data/sdparm-1.10/lib/sg_cmds_basic.c:595:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char rlCmdBlk[REPORT_LUNS_CMDLEN] =
data/sdparm-1.10/lib/sg_cmds_basic.c:597:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char sense_b[SENSE_BUFF_LEN];
data/sdparm-1.10/lib/sg_cmds_basic2.c:99:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char scCmdBlk[SYNCHRONIZE_CACHE_CMDLEN] =
data/sdparm-1.10/lib/sg_cmds_basic2.c:101:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char sense_b[SENSE_BUFF_LEN];
data/sdparm-1.10/lib/sg_cmds_basic2.c:158:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char rcCmdBlk[SERVICE_ACTION_IN_16_CMDLEN] =
data/sdparm-1.10/lib/sg_cmds_basic2.c:161:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char sense_b[SENSE_BUFF_LEN];
data/sdparm-1.10/lib/sg_cmds_basic2.c:213:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char rcCmdBlk[READ_CAPACITY_10_CMDLEN] =
data/sdparm-1.10/lib/sg_cmds_basic2.c:215:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char sense_b[SENSE_BUFF_LEN];
data/sdparm-1.10/lib/sg_cmds_basic2.c:265:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char modesCmdBlk[MODE_SENSE6_CMDLEN] =
data/sdparm-1.10/lib/sg_cmds_basic2.c:267:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char sense_b[SENSE_BUFF_LEN];
data/sdparm-1.10/lib/sg_cmds_basic2.c:338:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char modesCmdBlk[MODE_SENSE10_CMDLEN] =
data/sdparm-1.10/lib/sg_cmds_basic2.c:340:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char sense_b[SENSE_BUFF_LEN];
data/sdparm-1.10/lib/sg_cmds_basic2.c:410:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char modesCmdBlk[MODE_SELECT6_CMDLEN] =
data/sdparm-1.10/lib/sg_cmds_basic2.c:412:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char sense_b[SENSE_BUFF_LEN];
data/sdparm-1.10/lib/sg_cmds_basic2.c:469:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char modesCmdBlk[MODE_SELECT10_CMDLEN] =
data/sdparm-1.10/lib/sg_cmds_basic2.c:471:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char sense_b[SENSE_BUFF_LEN];
data/sdparm-1.10/lib/sg_cmds_basic2.c:590:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char buff[MODE_RESP_ARB_LEN];
data/sdparm-1.10/lib/sg_cmds_basic2.c:591: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 ebuff[EBUFF_SZ];
data/sdparm-1.10/lib/sg_cmds_basic2.c:674: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(pcontrol_arr[k], buff + offset, xfer_len);
data/sdparm-1.10/lib/sg_cmds_basic2.c:689:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char logsCmdBlk[LOG_SENSE_CMDLEN] =
data/sdparm-1.10/lib/sg_cmds_basic2.c:691:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char sense_b[SENSE_BUFF_LEN];
data/sdparm-1.10/lib/sg_cmds_basic2.c:764:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char logsCmdBlk[LOG_SELECT_CMDLEN] =
data/sdparm-1.10/lib/sg_cmds_basic2.c:766:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char sense_b[SENSE_BUFF_LEN];
data/sdparm-1.10/lib/sg_cmds_basic2.c:831:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char ssuBlk[START_STOP_CMDLEN] = {START_STOP_CMD, 0, 0, 0, 0, 0};
data/sdparm-1.10/lib/sg_cmds_basic2.c:832:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char sense_b[SENSE_BUFF_LEN];
data/sdparm-1.10/lib/sg_cmds_basic2.c:884:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char pCmdBlk[PREVENT_ALLOW_CMDLEN] =
data/sdparm-1.10/lib/sg_cmds_basic2.c:886:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char sense_b[SENSE_BUFF_LEN];
data/sdparm-1.10/lib/sg_cmds_extra.c:122:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char getLbaStatCmd[SERVICE_ACTION_IN_16_CMDLEN];
data/sdparm-1.10/lib/sg_cmds_extra.c:123:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char sense_b[SENSE_BUFF_LEN];
data/sdparm-1.10/lib/sg_cmds_extra.c:189:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char rtpgCmdBlk[MAINTENANCE_IN_CMDLEN] =
data/sdparm-1.10/lib/sg_cmds_extra.c:192:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char sense_b[SENSE_BUFF_LEN];
data/sdparm-1.10/lib/sg_cmds_extra.c:249:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char stpgCmdBlk[MAINTENANCE_OUT_CMDLEN] =
data/sdparm-1.10/lib/sg_cmds_extra.c:252:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char sense_b[SENSE_BUFF_LEN];
data/sdparm-1.10/lib/sg_cmds_extra.c:304:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char repRefCmdBlk[SERVICE_ACTION_IN_16_CMDLEN] =
data/sdparm-1.10/lib/sg_cmds_extra.c:307:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char sense_b[SENSE_BUFF_LEN];
data/sdparm-1.10/lib/sg_cmds_extra.c:367:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char senddiagCmdBlk[SEND_DIAGNOSTIC_CMDLEN] =
data/sdparm-1.10/lib/sg_cmds_extra.c:369:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char sense_b[SENSE_BUFF_LEN];
data/sdparm-1.10/lib/sg_cmds_extra.c:428:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char rcvdiagCmdBlk[RECEIVE_DIAGNOSTICS_CMDLEN] =
data/sdparm-1.10/lib/sg_cmds_extra.c:430:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char sense_b[SENSE_BUFF_LEN];
data/sdparm-1.10/lib/sg_cmds_extra.c:487:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char rdefCmdBlk[READ_DEFECT10_CMDLEN] =
data/sdparm-1.10/lib/sg_cmds_extra.c:489:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char sense_b[SENSE_BUFF_LEN];
data/sdparm-1.10/lib/sg_cmds_extra.c:548:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char rmsnCmdBlk[SERVICE_ACTION_IN_12_CMDLEN] =
data/sdparm-1.10/lib/sg_cmds_extra.c:551:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char sense_b[SENSE_BUFF_LEN];
data/sdparm-1.10/lib/sg_cmds_extra.c:606:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char riiCmdBlk[MAINTENANCE_IN_CMDLEN] = {MAINTENANCE_IN_CMD,
data/sdparm-1.10/lib/sg_cmds_extra.c:609:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char sense_b[SENSE_BUFF_LEN];
data/sdparm-1.10/lib/sg_cmds_extra.c:666:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char siiCmdBlk[MAINTENANCE_OUT_CMDLEN] = {MAINTENANCE_OUT_CMD,
data/sdparm-1.10/lib/sg_cmds_extra.c:669:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char sense_b[SENSE_BUFF_LEN];
data/sdparm-1.10/lib/sg_cmds_extra.c:736:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char fuCmdBlk[FORMAT_UNIT_CMDLEN] =
data/sdparm-1.10/lib/sg_cmds_extra.c:738:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char sense_b[SENSE_BUFF_LEN];
data/sdparm-1.10/lib/sg_cmds_extra.c:802:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char reassCmdBlk[REASSIGN_BLKS_CMDLEN] =
data/sdparm-1.10/lib/sg_cmds_extra.c:804:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char sense_b[SENSE_BUFF_LEN];
data/sdparm-1.10/lib/sg_cmds_extra.c:858:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char prinCmdBlk[PERSISTENT_RESERVE_IN_CMDLEN] =
data/sdparm-1.10/lib/sg_cmds_extra.c:860:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char sense_b[SENSE_BUFF_LEN];
data/sdparm-1.10/lib/sg_cmds_extra.c:919:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char proutCmdBlk[PERSISTENT_RESERVE_OUT_CMDLEN] =
data/sdparm-1.10/lib/sg_cmds_extra.c:921:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char sense_b[SENSE_BUFF_LEN];
data/sdparm-1.10/lib/sg_cmds_extra.c:997:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char readLongCmdBlk[READ_LONG10_CMDLEN];
data/sdparm-1.10/lib/sg_cmds_extra.c:998:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char sense_b[SENSE_BUFF_LEN];
data/sdparm-1.10/lib/sg_cmds_extra.c:1081:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char readLongCmdBlk[SERVICE_ACTION_IN_16_CMDLEN];
data/sdparm-1.10/lib/sg_cmds_extra.c:1082:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char sense_b[SENSE_BUFF_LEN];
data/sdparm-1.10/lib/sg_cmds_extra.c:1166:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char writeLongCmdBlk[WRITE_LONG10_CMDLEN];
data/sdparm-1.10/lib/sg_cmds_extra.c:1167:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char sense_b[SENSE_BUFF_LEN];
data/sdparm-1.10/lib/sg_cmds_extra.c:1247:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char writeLongCmdBlk[SERVICE_ACTION_OUT_16_CMDLEN];
data/sdparm-1.10/lib/sg_cmds_extra.c:1248:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char sense_b[SENSE_BUFF_LEN];
data/sdparm-1.10/lib/sg_cmds_extra.c:1331:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char vCmdBlk[VERIFY10_CMDLEN] =
data/sdparm-1.10/lib/sg_cmds_extra.c:1333:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char sense_b[SENSE_BUFF_LEN];
data/sdparm-1.10/lib/sg_cmds_extra.c:1409:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char vCmdBlk[VERIFY16_CMDLEN] =
data/sdparm-1.10/lib/sg_cmds_extra.c:1411:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char sense_b[SENSE_BUFF_LEN];
data/sdparm-1.10/lib/sg_cmds_extra.c:1504:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char aptCmdBlk[ATA_PT_16_CMDLEN] =
data/sdparm-1.10/lib/sg_cmds_extra.c:1506:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char sense_b[SENSE_BUFF_LEN];
data/sdparm-1.10/lib/sg_cmds_extra.c:1511: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 b[256];
data/sdparm-1.10/lib/sg_cmds_extra.c:1535: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(aptCmdBlk + 1, cdbp + 1, ((cdb_len > 11) ? 10 : (cdb_len - 1)));
data/sdparm-1.10/lib/sg_cmds_extra.c:1537: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(aptCmdBlk + 1, cdbp + 1, ((cdb_len > 15) ? 14 : (cdb_len - 1)));
data/sdparm-1.10/lib/sg_cmds_extra.c:1597: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(sensep, sp, k);
data/sdparm-1.10/lib/sg_cmds_extra.c:1605: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(ata_return_dp, ucp, k);
data/sdparm-1.10/lib/sg_cmds_extra.c:1642:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char rbufCmdBlk[READ_BUFFER_CMDLEN] =
data/sdparm-1.10/lib/sg_cmds_extra.c:1644:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char sense_b[SENSE_BUFF_LEN];
data/sdparm-1.10/lib/sg_cmds_extra.c:1700:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char wbufCmdBlk[WRITE_BUFFER_CMDLEN] =
data/sdparm-1.10/lib/sg_cmds_extra.c:1702:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char sense_b[SENSE_BUFF_LEN];
data/sdparm-1.10/lib/sg_cmds_extra.c:1769:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char uCmdBlk[UNMAP_CMDLEN] =
data/sdparm-1.10/lib/sg_cmds_extra.c:1771:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char sense_b[SENSE_BUFF_LEN];
data/sdparm-1.10/lib/sg_cmds_extra.c:1826:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char rlCmdBlk[READ_BLOCK_LIMITS_CMDLEN] =
data/sdparm-1.10/lib/sg_cmds_extra.c:1828:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char sense_b[SENSE_BUFF_LEN];
data/sdparm-1.10/lib/sg_cmds_extra.c:1881:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char rcvcopyresCmdBlk[THIRD_PARTY_COPY_IN_CMDLEN] =
data/sdparm-1.10/lib/sg_cmds_extra.c:1883:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char sense_b[SENSE_BUFF_LEN];
data/sdparm-1.10/lib/sg_cmds_extra.c:1885: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 b[64];
data/sdparm-1.10/lib/sg_cmds_extra.c:1944:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char xcopyCmdBlk[THIRD_PARTY_COPY_OUT_CMDLEN] =
data/sdparm-1.10/lib/sg_cmds_extra.c:1946:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char sense_b[SENSE_BUFF_LEN];
data/sdparm-1.10/lib/sg_cmds_extra.c:2004:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char xcopyCmdBlk[THIRD_PARTY_COPY_OUT_CMDLEN] =
data/sdparm-1.10/lib/sg_cmds_extra.c:2006:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char sense_b[SENSE_BUFF_LEN];
data/sdparm-1.10/lib/sg_cmds_extra.c:2008: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 cname[80];
data/sdparm-1.10/lib/sg_cmds_mmc.c:70:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char scsCmdBlk[SET_CD_SPEED_CMDLEN] = {SET_CD_SPEED_CMD, 0,
data/sdparm-1.10/lib/sg_cmds_mmc.c:72:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char sense_b[SENSE_BUFF_LEN];
data/sdparm-1.10/lib/sg_cmds_mmc.c:130:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char gcCmdBlk[GET_CONFIG_CMD_LEN] = {GET_CONFIG_CMD, 0, 0, 0,
data/sdparm-1.10/lib/sg_cmds_mmc.c:132:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char sense_b[SENSE_BUFF_LEN];
data/sdparm-1.10/lib/sg_cmds_mmc.c:217:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char gpCmdBlk[GET_PERFORMANCE_CMD_LEN] = {GET_PERFORMANCE_CMD, 0,
data/sdparm-1.10/lib/sg_cmds_mmc.c:219:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char sense_b[SENSE_BUFF_LEN];
data/sdparm-1.10/lib/sg_cmds_mmc.c:305:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char ssCmdBlk[SET_STREAMING_CMDLEN] =
data/sdparm-1.10/lib/sg_cmds_mmc.c:307:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char sense_b[SENSE_BUFF_LEN];
data/sdparm-1.10/lib/sg_lib.c:140: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 buff[CMD_NAME_LEN];
data/sdparm-1.10/lib/sg_lib.c:193: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 buff[128];
data/sdparm-1.10/lib/sg_lib.c:547: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 e[64];
data/sdparm-1.10/lib/sg_lib.c:1051: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 c[40];
data/sdparm-1.10/lib/sg_lib.c:1107: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 z[64];
data/sdparm-1.10/lib/sg_lib.c:1295: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 c[480];
data/sdparm-1.10/lib/sg_lib.c:1420: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 error_buff[64];
data/sdparm-1.10/lib/sg_lib.c:1421:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char b[256];
data/sdparm-1.10/lib/sg_lib.c:1614: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 z[64];
data/sdparm-1.10/lib/sg_lib.c:1632: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 b[2048];
data/sdparm-1.10/lib/sg_lib.c:1802: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 b[80];
data/sdparm-1.10/lib/sg_lib.c:2078: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 safe_errbuf[64] = {'u', 'n', 'k', 'n', 'o', 'w', 'n', ' ',
data/sdparm-1.10/lib/sg_lib.c:2124: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 buff[82];
data/sdparm-1.10/lib/sg_lib.c:2231: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 buff[122];
data/sdparm-1.10/lib/sg_lib.c:2254: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(buff, leadin, bpstart);
data/sdparm-1.10/lib/sg_lib.c:2270: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(buff, leadin, bpstart);
data/sdparm-1.10/lib/sg_lib.c:2289: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 c[sizeof(unsigned short)];
data/sdparm-1.10/lib/sg_lib.c:2322: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 buff[82];
data/sdparm-1.10/lib/sg_lib.c:2415: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 lb[16];
data/sdparm-1.10/lib/sg_lib.c:2433: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(lb, buf, len);
data/sdparm-1.10/lib/sg_lib.c:2550: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 lb[32];
data/sdparm-1.10/lib/sg_lib.c:2568: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(lb, buf, len);
data/sdparm-1.10/lib/sg_pt_freebsd.c:397: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(ccb->csio.cdb_io.cdb_bytes, ptp->cdb, ptp->cdb_len);
data/sdparm-1.10/lib/sg_pt_freebsd.c:426: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(ptp->sense, &(ccb->csio.sense_data), len);
data/sdparm-1.10/lib/sg_pt_linux.c:152:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fd = open(device_name, flags);
data/sdparm-1.10/lib/sg_pt_linux.c:536:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char tmf_request[4];
data/sdparm-1.10/lib/sg_pt_linux.c:553: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 a[128];
data/sdparm-1.10/lib/sg_pt_linux.c:554: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 b[128];
data/sdparm-1.10/lib/sg_pt_linux.c:558:23:  [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 (NULL == (fp = fopen(proc_devices, "r"))) {
data/sdparm-1.10/lib/sg_pt_linux.c:611:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fd = open(device_name, flags);
data/sdparm-1.10/lib/sg_pt_osf1.c:106:17:  [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).
        camfd = open(cam_dev, O_RDWR, 0);
data/sdparm-1.10/lib/sg_pt_osf1.c:131:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fd = open(device_name, O_RDONLY|O_NONBLOCK);
data/sdparm-1.10/lib/sg_pt_osf1.c:346:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char sensep[ADDL_SENSE_LENGTH];
data/sdparm-1.10/lib/sg_pt_osf1.c:397: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(ccb.cam_cdb_io.cam_cdb_bytes, ptp->cdb, ptp->cdb_len);
data/sdparm-1.10/lib/sg_pt_solaris.c:71:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fd = open(device_name, oflags);
data/sdparm-1.10/lib/sg_pt_win32.c:64: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 adapter[32];
data/sdparm-1.10/lib/sg_pt_win32.c:168:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buff[8];
data/sdparm-1.10/lib/sg_pt_win32.c:361: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(psp->swb_d.spt.Cdb, cdb, cdb_len);
data/sdparm-1.10/lib/sg_pt_win32.c:370: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(psp->swb_i.spt.Cdb, cdb, cdb_len);
data/sdparm-1.10/lib/sg_pt_win32.c:551: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(psp->sensep, psp->swb_d.ucSenseBuf, psp->sense_len);
data/sdparm-1.10/lib/sg_pt_win32.c:619: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(epsp, psp, sizeof(struct sg_pt_win32_scsi));
data/sdparm-1.10/lib/sg_pt_win32.c:652: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(psp->swb_i.ucDataBuf, psp->dxferp, psp->dxfer_len);
data/sdparm-1.10/lib/sg_pt_win32.c:671: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(psp->dxferp, psp->swb_i.ucDataBuf, psp->dxfer_len);
data/sdparm-1.10/lib/sg_pt_win32.c:676: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(psp->sensep, psp->swb_i.ucSenseBuf, psp->sense_len);
data/sdparm-1.10/src/chk_sdparm_data.c:50: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.
static unsigned char cl_pdt_arr[MAX_PDT + 1][MAX_MP_LEN];
data/sdparm-1.10/src/chk_sdparm_data.c:51: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.
static unsigned char cl_common_arr[MAX_MP_LEN];
data/sdparm-1.10/src/getopt_long.c:157:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
			((char **) nargv)[pos] = nargv[cstart];
data/sdparm-1.10/src/getopt_long.c:159:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
			((char **)nargv)[cstart] = swap;
data/sdparm-1.10/src/sdparm.c:87: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.
static unsigned char inhex_buff[INHEX_BUFF_SZ];
data/sdparm-1.10/src/sdparm.c:252:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char line[512];
data/sdparm-1.10/src/sdparm.c:253:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char carry_over[4];
data/sdparm-1.10/src/sdparm.c:267: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).
            fd = open(fname, O_RDONLY);
data/sdparm-1.10/src/sdparm.c:309: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).
            fp = fopen(fname, "r");
data/sdparm-1.10/src/sdparm.c:505:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char b[128];
data/sdparm-1.10/src/sdparm.c:528: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 buff[128];
data/sdparm-1.10/src/sdparm.c:529: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 b[128];
data/sdparm-1.10/src/sdparm.c:709:52:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    const unsigned char * cur_mp = (const unsigned char *)pc_arr[0];
data/sdparm-1.10/src/sdparm.c:710:52:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    const unsigned char * cha_mp = (const unsigned char *)pc_arr[1];
data/sdparm-1.10/src/sdparm.c:711:52:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    const unsigned char * def_mp = (const unsigned char *)pc_arr[2];
data/sdparm-1.10/src/sdparm.c:712:52:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    const unsigned char * sav_mp = (const unsigned char *)pc_arr[3];
data/sdparm-1.10/src/sdparm.c:773:52:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    const unsigned char * cur_mp = (const unsigned char *)pc_arr[0];
data/sdparm-1.10/src/sdparm.c:774:52:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    const unsigned char * cha_mp = (const unsigned char *)pc_arr[1];
data/sdparm-1.10/src/sdparm.c:775:52:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    const unsigned char * def_mp = (const unsigned char *)pc_arr[2];
data/sdparm-1.10/src/sdparm.c:776:52:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    const unsigned char * sav_mp = (const unsigned char *)pc_arr[3];
data/sdparm-1.10/src/sdparm.c:781: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 b[32];
data/sdparm-1.10/src/sdparm.c:842:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char cur_mp[DEF_MODE_RESP_LEN];
data/sdparm-1.10/src/sdparm.c:883:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char cur_mp[DEF_MODE_RESP_LEN];
data/sdparm-1.10/src/sdparm.c:884:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char cha_mp[DEF_MODE_RESP_LEN];
data/sdparm-1.10/src/sdparm.c:885:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char def_mp[DEF_MODE_RESP_LEN];
data/sdparm-1.10/src/sdparm.c:886:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char sav_mp[DEF_MODE_RESP_LEN];
data/sdparm-1.10/src/sdparm.c:888: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 buff[128];
data/sdparm-1.10/src/sdparm.c:1139: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 buff[128];
data/sdparm-1.10/src/sdparm.c:1140: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 ebuff[128];
data/sdparm-1.10/src/sdparm.c:1429:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char cur_mp[DEF_MODE_RESP_LEN];
data/sdparm-1.10/src/sdparm.c:1430:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char cha_mp[DEF_MODE_RESP_LEN];
data/sdparm-1.10/src/sdparm.c:1431:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char def_mp[DEF_MODE_RESP_LEN];
data/sdparm-1.10/src/sdparm.c:1432:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char sav_mp[DEF_MODE_RESP_LEN];
data/sdparm-1.10/src/sdparm.c:1434: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 buff[128];
data/sdparm-1.10/src/sdparm.c:1435: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 b_tmp[32];
data/sdparm-1.10/src/sdparm.c:1613: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 ebuff[EBUFF_SZ];
data/sdparm-1.10/src/sdparm.c:1615:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char mdpg[MAX_MODE_DATA_LEN];
data/sdparm-1.10/src/sdparm.c:1619: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 b[128];
data/sdparm-1.10/src/sdparm.c:1620: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 b_tmp[32];
data/sdparm-1.10/src/sdparm.c:1651: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 b[80];
data/sdparm-1.10/src/sdparm.c:1762: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 ebuff[EBUFF_SZ];
data/sdparm-1.10/src/sdparm.c:1764: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 buff[128];
data/sdparm-1.10/src/sdparm.c:1809: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(mdp + off, mode_pg, md_len - off);
data/sdparm-1.10/src/sdparm.c:1840:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char cur_mp[DEF_MODE_RESP_LEN];
data/sdparm-1.10/src/sdparm.c:1841:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char def_mp[DEF_MODE_RESP_LEN];
data/sdparm-1.10/src/sdparm.c:1842: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 buff[128];
data/sdparm-1.10/src/sdparm.c:1925: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 buff[64];
data/sdparm-1.10/src/sdparm.c:1926: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 acron[64];
data/sdparm-1.10/src/sdparm.c:1927: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 vb[64];
data/sdparm-1.10/src/sdparm.c:2166: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 b[32];
data/sdparm-1.10/src/sdparm.c:2281:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    const char * device_name_arr[MAX_DEV_NAMES];
data/sdparm-1.10/src/sdparm.c:2884: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[DEVNAME_SZ];
data/sdparm-1.10/src/sdparm.c:2908:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        fd = open(name, O_RDONLY | O_NONBLOCK);
data/sdparm-1.10/src/sdparm.c:2962:16:  [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).
        return open(name, O_NONBLOCK | (rw ? O_RDWR : O_RDONLY));
data/sdparm-1.10/src/sdparm_cmd.c:58:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char resp_buff[RCAP16_REPLY_LEN];
data/sdparm-1.10/src/sdparm_cmd.c:108:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char buff[32];
data/sdparm-1.10/src/sdparm_cmd.c:109: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 b[128];
data/sdparm-1.10/src/sdparm_cmd.c:177: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 perf_desc[28];
data/sdparm-1.10/src/sdparm_cmd.c:210: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 buff[8 + (16 * 16)];
data/sdparm-1.10/src/sdparm_cmd.c:265: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 buff[128];
data/sdparm-1.10/src/sdparm_cmd.c:318:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char resp[MAX_CONFIG_RESPLEN];
data/sdparm-1.10/src/sdparm_cmd.c:336: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 buff[16];
data/sdparm-1.10/src/sdparm_vpd.c:60:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char sas_tport_addr[8];
data/sdparm-1.10/src/sdparm_vpd.c:240: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 b[2048];
data/sdparm-1.10/src/sdparm_vpd.c:565: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 b[80];
data/sdparm-1.10/src/sdparm_vpd.c:968: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 b[80];
data/sdparm-1.10/src/sdparm_vpd.c:977: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(b, buff + 8, 8);
data/sdparm-1.10/src/sdparm_vpd.c:980: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(b, buff + 16, 16);
data/sdparm-1.10/src/sdparm_vpd.c:983: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(b, buff + 32, 4);
data/sdparm-1.10/src/sdparm_vpd.c:1103:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char b[4];
data/sdparm-1.10/src/sdparm_vpd.c:1133: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(b, buff + 32, 4);
data/sdparm-1.10/src/sdparm_vpd.c:1565:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char b[DEF_INQ_RESP_LEN];
data/sdparm-1.10/src/sdparm_vpd.c:1636:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char b[VPD_ATA_INFO_RESP_LEN];
data/sdparm-1.10/src/sdparm_vpd.c:1637: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 c[80];
data/sdparm-1.10/src/sdparm_vpd.c:1646: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(b, ihbp, sz);
data/sdparm-1.10/src/sdparm_wscan.c:162: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 raw[256];
data/sdparm-1.10/src/sdparm_wscan.c:167: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 raw[1060];
data/sdparm-1.10/src/sdparm_wscan.c:171: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[32];
data/sdparm-1.10/src/sdparm_wscan.c:172: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    volume_letters[32];
data/sdparm-1.10/src/sdparm_wscan.c:266: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 b[256];
data/sdparm-1.10/src/sdparm_wscan.c:293: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 b[256];
data/sdparm-1.10/src/sdparm_wscan.c:380: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 adapter_name[64];
data/sdparm-1.10/src/sdparm_wscan.c:381: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 inqDataBuff[8192];
data/sdparm-1.10/src/sdparm_wscan.c:383: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 b[256];
data/sdparm-1.10/src/sdparm_wscan.c:454: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 adapter_name[64];
data/sdparm-1.10/src/sdparm_wscan.c:491: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 adapter_name[64];
data/sdparm-1.10/src/sdparm_wscan.c:492: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 b[256];
data/sdparm-1.10/src/sdparm_wscan.c:516: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(&storage_arr[next_unused_elem++], &tmp_se, sizeof(tmp_se));
data/sdparm-1.10/src/sdparm_wscan.c:541: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 adapter_name[64];
data/sdparm-1.10/src/sdparm_wscan.c:542: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 b[256];
data/sdparm-1.10/src/sdparm_wscan.c:565: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(&storage_arr[next_unused_elem++], &tmp_se, sizeof(tmp_se));
data/sdparm-1.10/src/sdparm_wscan.c:590: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 adapter_name[64];
data/sdparm-1.10/src/sdparm_wscan.c:591: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 b[256];
data/sdparm-1.10/src/sdparm_wscan.c:614: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(&storage_arr[next_unused_elem++], &tmp_se, sizeof(tmp_se));
data/sdparm-1.10/lib/sg_cmds_basic.c:148: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).
        if (leadin && (strlen(leadin) > 0))
data/sdparm-1.10/lib/sg_lib.c:1501:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            if (strlen(lip) > 0)
data/sdparm-1.10/lib/sg_lib.c:1597: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(lip) > 0)
data/sdparm-1.10/lib/sg_lib.c:2091:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        len = strlen(safe_errbuf);
data/sdparm-1.10/lib/sg_lib.c:2104: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 (k = ((int)strlen(b) - 1); k >= 0; --k) {
data/sdparm-1.10/lib/sg_lib.c:2243: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).
        bpstart = strlen(leadin);
data/sdparm-1.10/lib/sg_lib.c:2419:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = strlen(buf);
data/sdparm-1.10/lib/sg_lib.c:2516:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = strlen(buf);
data/sdparm-1.10/lib/sg_lib.c:2554:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = strlen(buf);
data/sdparm-1.10/lib/sg_pt_freebsd.c:511:9:  [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(b, "no transport error available", max_b_len);
data/sdparm-1.10/lib/sg_pt_freebsd.c:520:9:  [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(b, "no transport error available", max_b_len);
data/sdparm-1.10/lib/sg_pt_freebsd.c:524: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(b, "no transport error available", max_b_len);
data/sdparm-1.10/lib/sg_pt_freebsd.c:537:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(b, cp, max_b_len);
data/sdparm-1.10/lib/sg_pt_freebsd.c:538: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).
    if ((int)strlen(cp) >= max_b_len)
data/sdparm-1.10/lib/sg_pt_linux.c:488:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(b, cp, max_b_len);
data/sdparm-1.10/lib/sg_pt_linux.c:489: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).
    if ((int)strlen(cp) >= max_b_len)
data/sdparm-1.10/lib/sg_pt_linux.c:564:19:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
        if ((1 == sscanf(b, "%126s", a)) &&
data/sdparm-1.10/lib/sg_pt_linux.c:569:18:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
        if (2 == sscanf(b, "%d %126s", &n, a)) {
data/sdparm-1.10/lib/sg_pt_linux.c:925:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(b, cp, max_b_len);
data/sdparm-1.10/lib/sg_pt_linux.c:926: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).
    if ((int)strlen(cp) >= max_b_len)
data/sdparm-1.10/lib/sg_pt_osf1.c:501:9:  [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(b, "no transport error available", max_b_len);
data/sdparm-1.10/lib/sg_pt_osf1.c:505: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(b, "no transport error available", max_b_len);
data/sdparm-1.10/lib/sg_pt_osf1.c:517:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(b, cp, max_b_len);
data/sdparm-1.10/lib/sg_pt_osf1.c:518: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).
    if ((int)strlen(cp) >= max_b_len)
data/sdparm-1.10/lib/sg_pt_solaris.c:361:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(b, cp, max_b_len);
data/sdparm-1.10/lib/sg_pt_solaris.c:362: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).
    if ((int)strlen(cp) >= max_b_len)
data/sdparm-1.10/lib/sg_pt_win32.c:190: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(device_name);
data/sdparm-1.10/lib/sg_pt_win32.c:225: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(shp->adapter, "\\\\.\\", 4);
data/sdparm-1.10/lib/sg_pt_win32.c:812:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(b, cp, max_b_len);
data/sdparm-1.10/lib/sg_pt_win32.c:813: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).
    if ((int)strlen(cp) >= max_b_len)
data/sdparm-1.10/src/getopt_long.c:345: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/sdparm-1.10/src/getopt_long.c:353: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/sdparm-1.10/src/sdparm.c:259: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).
    fn_len = strlen(fname);
data/sdparm-1.10/src/sdparm.c:274:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        k = read(fd, mp_arr, max_arr_len);
data/sdparm-1.10/src/sdparm.c:288:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                m = read(fd, mp_arr + k, max_arr_len - k);
data/sdparm-1.10/src/sdparm.c:321:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        in_len = strlen(line);
data/sdparm-1.10/src/sdparm.c:392: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).
                    if (split_line && (1 == strlen(lcp))) {
data/sdparm-1.10/src/sdparm.c:513:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(b, p, n);
data/sdparm-1.10/src/sdparm.c:809:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(b, mpi->acron, sizeof(b));
data/sdparm-1.10/src/sdparm.c:812: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).
            n = strlen(b);
data/sdparm-1.10/src/sdparm.c:1345:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(b, ref_mpi->acron, b_len);
data/sdparm-1.10/src/sdparm.c:1347: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).
        n = strlen(b);
data/sdparm-1.10/src/sdparm.c:1906:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = strlen(buf);
data/sdparm-1.10/src/sdparm.c:1949:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(buff, cp, (len < b_sz ? len : b_sz));
data/sdparm-1.10/src/sdparm.c:1951:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(buff, cp, b_sz);
data/sdparm-1.10/src/sdparm.c:1957:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                strncpy(acron, buff, ecp - buff);
data/sdparm-1.10/src/sdparm.c:1976:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                strncpy(acron, vb, ecp - acron);
data/sdparm-1.10/src/sdparm.c:2087:23:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
                num = sscanf(buff + 2, "%x:%d:%d=%62s", &u,
data/sdparm-1.10/src/sdparm.c:2092:27:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
                    num = sscanf(buff, "%xh:%d:%d=%62s", &u,
data/sdparm-1.10/src/sdparm.c:2096:27:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
                    num = sscanf(buff, "%xH:%d:%d=%62s", &u,
data/sdparm-1.10/src/sdparm.c:2100:27:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
                    num = sscanf(buff, "%d:%d:%d=%62s", &ivp->mpi.start_byte,
data/sdparm-1.10/src/sdparm_access.c:277:49:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (sdp_strcase_eq_upto(vnp->acron, ap, strlen(vnp->acron)))
data/sdparm-1.10/src/sdparm_access.c:417:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(buff, sdparm_ansi_version_arr[version], buff_len - 1);
data/sdparm-1.10/src/sdparm_cmd.c:345:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(buff, cmd_str, len);
data/sdparm-1.10/src/sdparm_cmd.c:359:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if ((NULL == scmdp->name) && (strlen(cp) >= 2)) {
data/sdparm-1.10/src/sdparm_cmd.c:361:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            len = strlen(scmdp->min_abbrev);
data/sdparm-1.10/src/sdparm_vpd.c:633: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).
                    if (strlen(cp) > 0)
data/sdparm-1.10/src/sdparm_vpd.c:644: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).
                    if (strlen(cp) > 0)
data/sdparm-1.10/src/sdparm_vpd.c:667: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).
                    if (strlen(cp) > 0)
data/sdparm-1.10/src/sdparm_wscan.c:657: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).
            n = strlen(sp->volume_letters);

ANALYSIS SUMMARY:

Hits = 357
Lines analyzed = 24201 in approximately 0.81 seconds (29764 lines/second)
Physical Source Lines of Code (SLOC) = 20061
Hits@level = [0] 704 [1]  60 [2] 253 [3]   6 [4]  38 [5]   0
Hits@level+ = [0+] 1061 [1+] 357 [2+] 297 [3+]  44 [4+]  38 [5+]   0
Hits/KSLOC@level+ = [0+] 52.8887 [1+] 17.7957 [2+] 14.8048 [3+] 2.19331 [4+] 1.89422 [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.