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/smp-utils-0.99/lib/smp_sol_usmp.c Examining data/smp-utils-0.99/lib/mpi.h Examining data/smp-utils-0.99/lib/mpi_type.h Examining data/smp-utils-0.99/lib/smp_mptctl_io.h Examining data/smp-utils-0.99/lib/smp_fre_cam.c Examining data/smp-utils-0.99/lib/smp_lin_sel.c Examining data/smp-utils-0.99/lib/smp_dummy.c Examining data/smp-utils-0.99/lib/smp_lib.c Examining data/smp-utils-0.99/lib/smp_lin_bsg.c Examining data/smp-utils-0.99/lib/smp_aac_io.c Examining data/smp-utils-0.99/lib/mptctl.h Examining data/smp-utils-0.99/lib/smp_aac_io.h Examining data/smp-utils-0.99/lib/smp_lin_bsg.h Examining data/smp-utils-0.99/lib/smp_mptctl_glue.h Examining data/smp-utils-0.99/lib/aacraid.h Examining data/smp-utils-0.99/lib/smp_mptctl_io.c Examining data/smp-utils-0.99/lib/mpi_sas.h Examining data/smp-utils-0.99/include/smp_lib.h Examining data/smp-utils-0.99/include/sg_pr2serr.h Examining data/smp-utils-0.99/include/dummy/linux/bsg.h Examining data/smp-utils-0.99/include/sg_unaligned.h Examining data/smp-utils-0.99/src/smp_rep_broadcast.c Examining data/smp-utils-0.99/src/smp_ena_dis_zoning.c Examining data/smp-utils-0.99/src/smp_rep_manufacturer.c Examining data/smp-utils-0.99/src/smp_read_gpio.c Examining data/smp-utils-0.99/src/smp_phy_test.c Examining data/smp-utils-0.99/src/smp_write_gpio.c Examining data/smp-utils-0.99/src/smp_conf_route_info.c Examining data/smp-utils-0.99/src/smp_zone_activate.c Examining data/smp-utils-0.99/src/smp_conf_phy_event.c Examining data/smp-utils-0.99/src/smp_discover_list.c Examining data/smp-utils-0.99/src/smp_phy_control.c Examining data/smp-utils-0.99/src/smp_rep_route_info.c Examining data/smp-utils-0.99/src/smp_rep_zone_man_pass.c Examining data/smp-utils-0.99/src/smp_zone_lock.c Examining data/smp-utils-0.99/src/smp_zoned_broadcast.c Examining data/smp-utils-0.99/src/smp_conf_zone_phy_info.c Examining data/smp-utils-0.99/src/smp_rep_phy_sata.c Examining data/smp-utils-0.99/src/smp_rep_zone_perm_tbl.c Examining data/smp-utils-0.99/src/smp_rep_general.c Examining data/smp-utils-0.99/src/smp_rep_self_conf_stat.c Examining data/smp-utils-0.99/src/smp_rep_phy_err_log.c Examining data/smp-utils-0.99/src/smp_rep_phy_event.c Examining data/smp-utils-0.99/src/smp_discover.c Examining data/smp-utils-0.99/src/smp_conf_general.c Examining data/smp-utils-0.99/src/smp_rep_exp_route_tbl.c Examining data/smp-utils-0.99/src/smp_rep_phy_event_list.c Examining data/smp-utils-0.99/src/smp_zone_unlock.c Examining data/smp-utils-0.99/src/smp_conf_zone_perm_tbl.c Examining data/smp-utils-0.99/src/smp_conf_zone_man_pass.c FINAL RESULTS: data/smp-utils-0.99/include/sg_pr2serr.h:46: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/smp-utils-0.99/include/sg_pr2serr.h:49: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/smp-utils-0.99/include/sg_pr2serr.h:52:42: [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/smp-utils-0.99/lib/smp_lib.c:103:42: [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/smp-utils-0.99/lib/smp_lib.c:124: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/smp-utils-0.99/lib/smp_lib.c:569: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/smp-utils-0.99/lib/smp_lib.c:603: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/smp-utils-0.99/lib/smp_lib.c:1006:15: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. If the scanf format is influenceable by an attacker, it's exploitable. res = sscanf(buf + 2, "%" SCNx64, &unum); data/smp-utils-0.99/lib/smp_lib.c:1009:15: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. If the scanf format is influenceable by an attacker, it's exploitable. res = sscanf(buf, "%" SCNx64, &unum); data/smp-utils-0.99/lib/smp_lib.c:1155: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/smp-utils-0.99/lib/smp_lib.c:1167: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/smp-utils-0.99/lib/smp_lib.c:1179: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/smp-utils-0.99/src/smp_conf_general.c:179: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, "c:e:E:hHi:I:n:o:p:rR:s:S:vV", data/smp-utils-0.99/src/smp_conf_general.c:310:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. cp = getenv("SMP_UTILS_DEVICE"); data/smp-utils-0.99/src/smp_conf_general.c:328:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. cp = getenv("SMP_UTILS_SAS_ADDR"); data/smp-utils-0.99/src/smp_conf_phy_event.c:489: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, "CeE:f:hHI:p:P:rs:S:T:vV", long_options, data/smp-utils-0.99/src/smp_conf_phy_event.c:591:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. cp = getenv("SMP_UTILS_DEVICE"); data/smp-utils-0.99/src/smp_conf_phy_event.c:609:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. cp = getenv("SMP_UTILS_SAS_ADDR"); data/smp-utils-0.99/src/smp_conf_route_info.c:154: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, "dE:hHi:I:p:rR:s:vV", long_options, data/smp-utils-0.99/src/smp_conf_route_info.c:241:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. cp = getenv("SMP_UTILS_DEVICE"); data/smp-utils-0.99/src/smp_conf_route_info.c:259:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. cp = getenv("SMP_UTILS_SAS_ADDR"); data/smp-utils-0.99/src/smp_conf_zone_man_pass.c:333: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, "E:F:hHI:n:N:P:rs:S:vV", long_options, data/smp-utils-0.99/src/smp_conf_zone_man_pass.c:425:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. cp = getenv("SMP_UTILS_DEVICE"); data/smp-utils-0.99/src/smp_conf_zone_man_pass.c:443:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. cp = getenv("SMP_UTILS_SAS_ADDR"); data/smp-utils-0.99/src/smp_conf_zone_perm_tbl.c:328: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, "dE:f:hHI:n:P:rs:S:vV", long_options, data/smp-utils-0.99/src/smp_conf_zone_perm_tbl.c:425:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. cp = getenv("SMP_UTILS_DEVICE"); data/smp-utils-0.99/src/smp_conf_zone_perm_tbl.c:443:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. cp = getenv("SMP_UTILS_SAS_ADDR"); data/smp-utils-0.99/src/smp_conf_zone_phy_info.c:276: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, "E:hHI:p:rs:S:vV", long_options, data/smp-utils-0.99/src/smp_conf_zone_phy_info.c:347:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. cp = getenv("SMP_UTILS_DEVICE"); data/smp-utils-0.99/src/smp_conf_zone_phy_info.c:365:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. cp = getenv("SMP_UTILS_SAS_ADDR"); data/smp-utils-0.99/src/smp_discover.c:1209: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, "AbcDhHiI:lmMn:p:rs:SvVz", long_options, data/smp-utils-0.99/src/smp_discover.c:1312:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. cp = getenv("SMP_UTILS_DEVICE"); data/smp-utils-0.99/src/smp_discover.c:1330:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. cp = getenv("SMP_UTILS_SAS_ADDR"); data/smp-utils-0.99/src/smp_discover.c:1353:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. cp = getenv("SMP_UTILS_DSN"); data/smp-utils-0.99/src/smp_discover_list.c:1131: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, "Abcd:Df:hHiI:ln:op:rs:SvVZ:", data/smp-utils-0.99/src/smp_discover_list.c:1245:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. cp = getenv("SMP_UTILS_DEVICE"); data/smp-utils-0.99/src/smp_discover_list.c:1263:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. cp = getenv("SMP_UTILS_SAS_ADDR"); data/smp-utils-0.99/src/smp_discover_list.c:1292:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. cp = getenv("SMP_UTILS_DSN"); data/smp-utils-0.99/src/smp_ena_dis_zoning.c:153: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, "de:E:hHI:rs:S:vV", long_options, data/smp-utils-0.99/src/smp_ena_dis_zoning.c:232:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. cp = getenv("SMP_UTILS_DEVICE"); data/smp-utils-0.99/src/smp_ena_dis_zoning.c:250:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. cp = getenv("SMP_UTILS_SAS_ADDR"); data/smp-utils-0.99/src/smp_phy_control.c:223: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, "a:D:E:hHI:l:L:m:M:o:p:P:q:Q;rs:vV", data/smp-utils-0.99/src/smp_phy_control.c:396:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. cp = getenv("SMP_UTILS_DEVICE"); data/smp-utils-0.99/src/smp_phy_control.c:414:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. cp = getenv("SMP_UTILS_SAS_ADDR"); data/smp-utils-0.99/src/smp_phy_test.c:168: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, "c:d:E:f:hHI:l:p:P:rs:S:tvV", data/smp-utils-0.99/src/smp_phy_test.c:292:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. cp = getenv("SMP_UTILS_DEVICE"); data/smp-utils-0.99/src/smp_phy_test.c:310:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. cp = getenv("SMP_UTILS_SAS_ADDR"); data/smp-utils-0.99/src/smp_read_gpio.c:156: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, "c:EhHi:I:p:rs:t:vV", long_options, data/smp-utils-0.99/src/smp_read_gpio.c:244:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. cp = getenv("SMP_UTILS_DEVICE"); data/smp-utils-0.99/src/smp_read_gpio.c:262:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. cp = getenv("SMP_UTILS_SAS_ADDR"); data/smp-utils-0.99/src/smp_rep_broadcast.c:163: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, "b:hHI:rs:vV", long_options, data/smp-utils-0.99/src/smp_rep_broadcast.c:225:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. cp = getenv("SMP_UTILS_DEVICE"); data/smp-utils-0.99/src/smp_rep_broadcast.c:243:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. cp = getenv("SMP_UTILS_SAS_ADDR"); data/smp-utils-0.99/src/smp_rep_exp_route_tbl.c:259: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, "bhHi:I:n:p:rs:vV", long_options, data/smp-utils-0.99/src/smp_rep_exp_route_tbl.c:338:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. cp = getenv("SMP_UTILS_DEVICE"); data/smp-utils-0.99/src/smp_rep_exp_route_tbl.c:356:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. cp = getenv("SMP_UTILS_SAS_ADDR"); data/smp-utils-0.99/src/smp_rep_general.c:148: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, "bchHI:rs:vVz", long_options, data/smp-utils-0.99/src/smp_rep_general.c:212:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. cp = getenv("SMP_UTILS_DEVICE"); data/smp-utils-0.99/src/smp_rep_general.c:230:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. cp = getenv("SMP_UTILS_SAS_ADDR"); data/smp-utils-0.99/src/smp_rep_manufacturer.c:138: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, "hHI:p:rs:vVz", long_options, data/smp-utils-0.99/src/smp_rep_manufacturer.c:195:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. cp = getenv("SMP_UTILS_DEVICE"); data/smp-utils-0.99/src/smp_rep_manufacturer.c:213:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. cp = getenv("SMP_UTILS_SAS_ADDR"); data/smp-utils-0.99/src/smp_rep_phy_err_log.c:141: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, "hHI:p:rs:vVz", long_options, data/smp-utils-0.99/src/smp_rep_phy_err_log.c:207:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. cp = getenv("SMP_UTILS_DEVICE"); data/smp-utils-0.99/src/smp_rep_phy_err_log.c:225:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. cp = getenv("SMP_UTILS_SAS_ADDR"); data/smp-utils-0.99/src/smp_rep_phy_event.c:320: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, "dehHI:lp:rs:vV", long_options, data/smp-utils-0.99/src/smp_rep_phy_event.c:400:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. cp = getenv("SMP_UTILS_DEVICE"); data/smp-utils-0.99/src/smp_rep_phy_event.c:418:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. cp = getenv("SMP_UTILS_SAS_ADDR"); data/smp-utils-0.99/src/smp_rep_phy_event_list.c:334: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, "defhHi:I:lnrs:vV", long_options, data/smp-utils-0.99/src/smp_rep_phy_event_list.c:417:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. cp = getenv("SMP_UTILS_DEVICE"); data/smp-utils-0.99/src/smp_rep_phy_event_list.c:436:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. cp = getenv("SMP_UTILS_SAS_ADDR"); data/smp-utils-0.99/src/smp_rep_phy_sata.c:149: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, "ahHI:p:rs:vVz", long_options, data/smp-utils-0.99/src/smp_rep_phy_sata.c:222:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. cp = getenv("SMP_UTILS_DEVICE"); data/smp-utils-0.99/src/smp_rep_phy_sata.c:240:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. cp = getenv("SMP_UTILS_SAS_ADDR"); data/smp-utils-0.99/src/smp_rep_route_info.c:331: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, "hHi:I:mn:p:rs:vVz", long_options, data/smp-utils-0.99/src/smp_rep_route_info.c:415:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. cp = getenv("SMP_UTILS_DEVICE"); data/smp-utils-0.99/src/smp_rep_route_info.c:433:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. cp = getenv("SMP_UTILS_SAS_ADDR"); data/smp-utils-0.99/src/smp_rep_self_conf_stat.c:209: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, "bhHi:I:lors:vV", long_options, data/smp-utils-0.99/src/smp_rep_self_conf_stat.c:280:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. cp = getenv("SMP_UTILS_DEVICE"); data/smp-utils-0.99/src/smp_rep_self_conf_stat.c:298:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. cp = getenv("SMP_UTILS_SAS_ADDR"); data/smp-utils-0.99/src/smp_rep_zone_man_pass.c:146: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, "F:hHI:prR:s:vV", long_options, data/smp-utils-0.99/src/smp_rep_zone_man_pass.c:213:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. cp = getenv("SMP_UTILS_DEVICE"); data/smp-utils-0.99/src/smp_rep_zone_man_pass.c:231:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. cp = getenv("SMP_UTILS_SAS_ADDR"); data/smp-utils-0.99/src/smp_rep_zone_perm_tbl.c:201: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, "aB:f:hHI:mn:NP:rR:s:vV", long_options, data/smp-utils-0.99/src/smp_rep_zone_perm_tbl.c:299:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. cp = getenv("SMP_UTILS_DEVICE"); data/smp-utils-0.99/src/smp_rep_zone_perm_tbl.c:317:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. cp = getenv("SMP_UTILS_SAS_ADDR"); data/smp-utils-0.99/src/smp_write_gpio.c:262: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, "c:d:EhHi:I:p:rs:t:vV", long_options, data/smp-utils-0.99/src/smp_write_gpio.c:368:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. cp = getenv("SMP_UTILS_DEVICE"); data/smp-utils-0.99/src/smp_write_gpio.c:386:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. cp = getenv("SMP_UTILS_SAS_ADDR"); data/smp-utils-0.99/src/smp_zone_activate.c:135: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, "E:hHI:rs:vV", long_options, data/smp-utils-0.99/src/smp_zone_activate.c:196:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. cp = getenv("SMP_UTILS_DEVICE"); data/smp-utils-0.99/src/smp_zone_activate.c:214:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. cp = getenv("SMP_UTILS_SAS_ADDR"); data/smp-utils-0.99/src/smp_zone_lock.c:313: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, "E:F:hHi:I:P:rs:vV", long_options, data/smp-utils-0.99/src/smp_zone_lock.c:393:15: [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. ccp = getenv("SMP_UTILS_DEVICE"); data/smp-utils-0.99/src/smp_zone_lock.c:411:15: [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. ccp = getenv("SMP_UTILS_SAS_ADDR"); data/smp-utils-0.99/src/smp_zone_unlock.c:140: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, "aE:hHI:rs:vV", long_options, data/smp-utils-0.99/src/smp_zone_unlock.c:204:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. cp = getenv("SMP_UTILS_DEVICE"); data/smp-utils-0.99/src/smp_zone_unlock.c:222:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. cp = getenv("SMP_UTILS_SAS_ADDR"); data/smp-utils-0.99/src/smp_zoned_broadcast.c:255: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, "b:E:F:hHI:rs:S:vV", long_options, data/smp-utils-0.99/src/smp_zoned_broadcast.c:329:15: [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. ccp = getenv("SMP_UTILS_DEVICE"); data/smp-utils-0.99/src/smp_zoned_broadcast.c:347:15: [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. ccp = getenv("SMP_UTILS_SAS_ADDR"); data/smp-utils-0.99/include/sg_unaligned.h:72: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(&u, p, 2); data/smp-utils-0.99/include/sg_unaligned.h:80: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(&u, p, 4); data/smp-utils-0.99/include/sg_unaligned.h:88: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(&u, p, 8); data/smp-utils-0.99/include/sg_unaligned.h:96: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(p, &u, 2); data/smp-utils-0.99/include/sg_unaligned.h:103: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(p, &u, 4); data/smp-utils-0.99/include/sg_unaligned.h:110: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(p, &u, 8); data/smp-utils-0.99/include/sg_unaligned.h:117: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(&u, p, 2); data/smp-utils-0.99/include/sg_unaligned.h:125: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(&u, p, 4); data/smp-utils-0.99/include/sg_unaligned.h:133: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(&u, p, 8); data/smp-utils-0.99/include/sg_unaligned.h:139: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(p, &val, 2); data/smp-utils-0.99/include/sg_unaligned.h:144: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(p, &val, 4); data/smp-utils-0.99/include/sg_unaligned.h:149: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(p, &val, 8); data/smp-utils-0.99/include/sg_unaligned.h:164: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(&u, p, 2); data/smp-utils-0.99/include/sg_unaligned.h:172: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(&u, p, 4); data/smp-utils-0.99/include/sg_unaligned.h:180: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(&u, p, 8); data/smp-utils-0.99/include/sg_unaligned.h:188: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(p, &u, 2); data/smp-utils-0.99/include/sg_unaligned.h:195: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(p, &u, 4); data/smp-utils-0.99/include/sg_unaligned.h:202: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(p, &u, 8); data/smp-utils-0.99/include/sg_unaligned.h:209:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&u, p, 2); data/smp-utils-0.99/include/sg_unaligned.h:217: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(&u, p, 4); data/smp-utils-0.99/include/sg_unaligned.h:225: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(&u, p, 8); data/smp-utils-0.99/include/sg_unaligned.h:231: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(p, &val, 2); data/smp-utils-0.99/include/sg_unaligned.h:236: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(p, &val, 4); data/smp-utils-0.99/include/sg_unaligned.h:241: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(p, &val, 8); data/smp-utils-0.99/include/smp_lib.h:144: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 device_name[SMP_MAX_DEVICE_NAME]; data/smp-utils-0.99/include/smp_lib.h:146: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_addr[8]; /* target SMP (opt) */ data/smp-utils-0.99/lib/mptctl.h:206:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char driverVersion[MPT_IOCTL_VERSION_LENGTH]; /* Driver Version (string) */ data/smp-utils-0.99/lib/mptctl.h:209:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char rsvd[2]; data/smp-utils-0.99/lib/mptctl.h:224:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char driverVersion[MPT_IOCTL_VERSION_LENGTH]; /* Driver Version (string) */ data/smp-utils-0.99/lib/mptctl.h:227:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char rsvd[2]; data/smp-utils-0.99/lib/mptctl.h:246:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char driverVersion[MPT_IOCTL_VERSION_LENGTH]; /* Driver Version (string) */ data/smp-utils-0.99/lib/mptctl.h:249:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char rsvd[2]; data/smp-utils-0.99/lib/mptctl.h:349:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char MF[1]; data/smp-utils-0.99/lib/mptctl.h:368:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char MF[1]; data/smp-utils-0.99/lib/smp_aac_io.c:53: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[256]; data/smp-utils-0.99/lib/smp_aac_io.c:56:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen("/proc/devices","r"); data/smp-utils-0.99/lib/smp_aac_io.c:93:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if(open(dev_name,O_RDWR) < 0) { data/smp-utils-0.99/lib/smp_aac_io.c:131:11: [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). res = open(dev_name,O_RDWR); data/smp-utils-0.99/lib/smp_aac_io.c:198: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(aSmpPassThruReq->smp_request,rresp->request + aSmpCmdReqOff,bytesToCopy); data/smp-utils-0.99/lib/smp_aac_io.c:215: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(aFib->data,aSmpPassThruReq,SIZE_SMP_PASS_THRU_REQ); data/smp-utils-0.99/lib/smp_aac_io.c:278: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(rresp->response + aSmpCmdRespOff ,&aFib->data[sizeof(SmpPassThruHeader)],aSmpResult->header.dataReceiveLength); data/smp-utils-0.99/lib/smp_aac_io.c:310: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(aFib->data,aSmpPassThruRes,SIZE_SMP_PASS_THRU_RES); data/smp-utils-0.99/lib/smp_fre_cam.c:55: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 devname[DEV_IDLEN + 1]; /* for cam */ data/smp-utils-0.99/lib/smp_lib.c:451:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char * phy_pwr_cond_arr[4] = { data/smp-utils-0.99/lib/smp_lib.c:476:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char * pwr_dis_signal_arr[4] = { data/smp-utils-0.99/lib/smp_lib.c:506: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/smp-utils-0.99/lib/smp_lib.c:539: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/smp-utils-0.99/lib/smp_lib.c:649: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[DSHS_LINE_BLEN + 2]; data/smp-utils-0.99/lib/smp_lib.c:650: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[DSHS_BPL + 1]; data/smp-utils-0.99/lib/smp_lib.c:678: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/smp-utils-0.99/lib/smp_lib.c:701: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/smp-utils-0.99/lib/smp_lib.c:841: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(uint16_t)]; data/smp-utils-0.99/lib/smp_lin_bsg.c:108: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[1024]; data/smp-utils-0.99/lib/smp_lin_bsg.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 sysfs_nm[1024]; data/smp-utils-0.99/lib/smp_lin_bsg.c:170: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[1024]; data/smp-utils-0.99/lib/smp_lin_bsg.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 sysfs_nm[1024 + 8]; data/smp-utils-0.99/lib/smp_lin_bsg.c:202:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(sysfs_nm, "r"); data/smp-utils-0.99/lib/smp_lin_bsg.c:236:15: [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). ret = open(buff, O_RDWR); data/smp-utils-0.99/lib/smp_lin_bsg.c:248:15: [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). ret = open(buff, O_RDWR); data/smp-utils-0.99/lib/smp_lin_bsg.c:277: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 cmd[16]; /* unused */ data/smp-utils-0.99/lib/smp_mptctl_io.c:54:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char null_sas_addr[8] = {0, 0, 0, 0, 0, 0, 0, 0, }; data/smp-utils-0.99/lib/smp_mptctl_io.c:97:11: [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). res = open(dev_name, O_RDWR); data/smp-utils-0.99/lib/smp_mptctl_io.c:197: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 reply_m[1200]; data/smp-utils-0.99/lib/smp_mptctl_io.c:253: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(ucp, target_sa, 8); data/smp-utils-0.99/lib/smp_mptctl_io.c:341: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(rresp->response, mpiBlkPtr->dataInBufPtr, data/smp-utils-0.99/lib/smp_mptctl_io.c:393: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(mpiBlkPtr->dataOutBufPtr, smp_request, sizeof(smp_request)); data/smp-utils-0.99/lib/smp_mptctl_io.c:409: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(&smpReq->SASAddress, expanderSasAddr, 8); data/smp-utils-0.99/lib/smp_mptctl_io.c:485: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(&smpReq->SASAddress,expanderSasAddr,8); data/smp-utils-0.99/lib/smp_mptctl_io.c:486: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(&smpReq->SGL,smp_request,sizeof(smp_request)); data/smp-utils-0.99/lib/smp_sol_usmp.c:72:15: [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). res = open(tobj->device_name, O_RDWR); data/smp-utils-0.99/src/smp_conf_general.c:165:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char i_params[256]; data/smp-utils-0.99/src/smp_conf_general.c:166: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 device_name[512]; data/smp-utils-0.99/src/smp_conf_general.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 b[256]; data/smp-utils-0.99/src/smp_conf_general.c:171: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 smp_resp[8]; data/smp-utils-0.99/src/smp_conf_phy_event.c:348: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/smp-utils-0.99/src/smp_conf_phy_event.c:354:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(file_name, "r"); data/smp-utils-0.99/src/smp_conf_phy_event.c:470: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 i_params[256]; data/smp-utils-0.99/src/smp_conf_phy_event.c:471: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 device_name[512]; data/smp-utils-0.99/src/smp_conf_phy_event.c:472: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/smp-utils-0.99/src/smp_conf_phy_event.c:473: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 pes_arr[MAX_PHY_EV_SRC]; data/smp-utils-0.99/src/smp_conf_phy_event.c:475: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 smp_req[1028]; data/smp-utils-0.99/src/smp_conf_phy_event.c:476: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 smp_resp[8]; data/smp-utils-0.99/src/smp_conf_route_info.c:139: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 i_params[256]; data/smp-utils-0.99/src/smp_conf_route_info.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 device_name[512]; data/smp-utils-0.99/src/smp_conf_route_info.c:141: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/smp-utils-0.99/src/smp_conf_route_info.c:146: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 smp_resp[8]; data/smp-utils-0.99/src/smp_conf_zone_man_pass.c:149:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char line[512]; data/smp-utils-0.99/src/smp_conf_zone_man_pass.c:159:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(fname, "r"); data/smp-utils-0.99/src/smp_conf_zone_man_pass.c:267: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(mp_arr + off, lcp + 1, k); data/smp-utils-0.99/src/smp_conf_zone_man_pass.c:311: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 password[32]; data/smp-utils-0.99/src/smp_conf_zone_man_pass.c:312: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 npassword[32]; data/smp-utils-0.99/src/smp_conf_zone_man_pass.c:313: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 i_params[256]; data/smp-utils-0.99/src/smp_conf_zone_man_pass.c:314: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 device_name[512]; data/smp-utils-0.99/src/smp_conf_zone_man_pass.c:315: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/smp-utils-0.99/src/smp_conf_zone_man_pass.c:323: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 smp_resp[8]; data/smp-utils-0.99/src/smp_conf_zone_man_pass.c:367: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(npassword , optarg, len); data/smp-utils-0.99/src/smp_conf_zone_man_pass.c:379: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(password , optarg, len); data/smp-utils-0.99/src/smp_conf_zone_man_pass.c:492: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(smp_req + 8, password, 32); data/smp-utils-0.99/src/smp_conf_zone_man_pass.c:493: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(smp_req + 40, npassword, 32); data/smp-utils-0.99/src/smp_conf_zone_perm_tbl.c:60: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 full_perm_tbl[32 * 256]; data/smp-utils-0.99/src/smp_conf_zone_perm_tbl.c:156: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/smp-utils-0.99/src/smp_conf_zone_perm_tbl.c:166:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(fname, "r"); data/smp-utils-0.99/src/smp_conf_zone_perm_tbl.c:316: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 i_params[256]; data/smp-utils-0.99/src/smp_conf_zone_perm_tbl.c:317: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 device_name[512]; data/smp-utils-0.99/src/smp_conf_zone_perm_tbl.c:318: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/smp-utils-0.99/src/smp_conf_zone_perm_tbl.c:319: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 smp_req[1028]; data/smp-utils-0.99/src/smp_conf_zone_perm_tbl.c:320: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 smp_resp[8]; data/smp-utils-0.99/src/smp_conf_zone_perm_tbl.c:506: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(smp_req + 16, full_perm_tbl + (j * desc_len), numd * desc_len); data/smp-utils-0.99/src/smp_conf_zone_phy_info.c:130: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/smp-utils-0.99/src/smp_conf_zone_phy_info.c:140:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(fname, "r"); data/smp-utils-0.99/src/smp_conf_zone_phy_info.c:261: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 i_params[256]; data/smp-utils-0.99/src/smp_conf_zone_phy_info.c:262: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 device_name[512]; data/smp-utils-0.99/src/smp_conf_zone_phy_info.c:263: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/smp-utils-0.99/src/smp_discover.c:203: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/smp-utils-0.99/src/smp_discover.c:403: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/smp-utils-0.99/src/smp_discover.c:684: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/smp-utils-0.99/src/smp_discover.c:932: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/smp-utils-0.99/src/smp_discover.c:933: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 dsn[10] = ""; data/smp-utils-0.99/src/smp_discover.c:1032:13: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(dsn, " dsn=%d", rp[108]); data/smp-utils-0.99/src/smp_discover.c:1198: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 i_params[256]; data/smp-utils-0.99/src/smp_discover.c:1199: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 device_name[512]; data/smp-utils-0.99/src/smp_discover_list.c:207: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/smp-utils-0.99/src/smp_discover_list.c:403: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/smp-utils-0.99/src/smp_discover_list.c:573: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/smp-utils-0.99/src/smp_discover_list.c:757: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/smp-utils-0.99/src/smp_discover_list.c:836: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/smp-utils-0.99/src/smp_discover_list.c:837: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 dsn[10] = ""; data/smp-utils-0.99/src/smp_discover_list.c:911:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(dsn, " dsn=%d", rp[108]); data/smp-utils-0.99/src/smp_discover_list.c:1117: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 i_params[256]; data/smp-utils-0.99/src/smp_discover_list.c:1118: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 device_name[512]; data/smp-utils-0.99/src/smp_discover_list.c:1350:30: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). op->zpi_filep = fopen(op->zpi_fn, "w"); data/smp-utils-0.99/src/smp_ena_dis_zoning.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 i_params[256]; data/smp-utils-0.99/src/smp_ena_dis_zoning.c:141: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 device_name[512]; data/smp-utils-0.99/src/smp_ena_dis_zoning.c:142: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/smp-utils-0.99/src/smp_phy_control.c:208: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 i_params[256]; data/smp-utils-0.99/src/smp_phy_control.c:209: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 device_name[512]; data/smp-utils-0.99/src/smp_phy_control.c:210: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/smp-utils-0.99/src/smp_phy_test.c:153: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 i_params[256]; data/smp-utils-0.99/src/smp_phy_test.c:154:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char device_name[512]; data/smp-utils-0.99/src/smp_phy_test.c:155: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/smp-utils-0.99/src/smp_read_gpio.c:142: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 i_params[256]; data/smp-utils-0.99/src/smp_read_gpio.c:143: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 device_name[512]; data/smp-utils-0.99/src/smp_read_gpio.c:147:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char b[128]; data/smp-utils-0.99/src/smp_rep_broadcast.c:150: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 i_params[256]; data/smp-utils-0.99/src/smp_rep_broadcast.c:151:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char device_name[512]; data/smp-utils-0.99/src/smp_rep_broadcast.c:152:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char b[256]; data/smp-utils-0.99/src/smp_rep_exp_route_tbl.c:146:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char b[256]; data/smp-utils-0.99/src/smp_rep_exp_route_tbl.c:247: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 i_params[256]; data/smp-utils-0.99/src/smp_rep_exp_route_tbl.c:248: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 device_name[512]; data/smp-utils-0.99/src/smp_rep_general.c:133: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/smp-utils-0.99/src/smp_rep_general.c:134:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char device_name[512]; data/smp-utils-0.99/src/smp_rep_general.c:135: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 i_params[256]; data/smp-utils-0.99/src/smp_rep_manufacturer.c:124:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char b[256]; data/smp-utils-0.99/src/smp_rep_manufacturer.c:125: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 device_name[512]; data/smp-utils-0.99/src/smp_rep_manufacturer.c:126: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 i_params[256]; data/smp-utils-0.99/src/smp_rep_phy_err_log.c:127: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/smp-utils-0.99/src/smp_rep_phy_err_log.c:128: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 device_name[512]; data/smp-utils-0.99/src/smp_rep_phy_err_log.c:129: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 i_params[256]; data/smp-utils-0.99/src/smp_rep_phy_event.c:187: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(b, pnp->pes_name, len); data/smp-utils-0.99/src/smp_rep_phy_event.c:201:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[32]; data/smp-utils-0.99/src/smp_rep_phy_event.c:202: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/smp-utils-0.99/src/smp_rep_phy_event.c:305: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/smp-utils-0.99/src/smp_rep_phy_event.c:306: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 device_name[512]; data/smp-utils-0.99/src/smp_rep_phy_event.c:307: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 i_params[256]; data/smp-utils-0.99/src/smp_rep_phy_event_list.c:196: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(b, pnp->pes_name, len); data/smp-utils-0.99/src/smp_rep_phy_event_list.c:210: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/smp-utils-0.99/src/smp_rep_phy_event_list.c:320: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 i_params[256]; data/smp-utils-0.99/src/smp_rep_phy_event_list.c:321: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 device_name[512]; data/smp-utils-0.99/src/smp_rep_phy_event_list.c:322: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/smp-utils-0.99/src/smp_rep_phy_sata.c:135: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 i_params[256]; data/smp-utils-0.99/src/smp_rep_phy_sata.c:136: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 device_name[512]; data/smp-utils-0.99/src/smp_rep_phy_sata.c:137: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/smp-utils-0.99/src/smp_rep_route_info.c:136: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/smp-utils-0.99/src/smp_rep_route_info.c:322: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 i_params[256]; data/smp-utils-0.99/src/smp_rep_route_info.c:323: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 device_name[512]; data/smp-utils-0.99/src/smp_rep_route_info.c:324: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/smp-utils-0.99/src/smp_rep_self_conf_stat.c:196: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/smp-utils-0.99/src/smp_rep_self_conf_stat.c:197: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 device_name[512]; data/smp-utils-0.99/src/smp_rep_self_conf_stat.c:198: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 i_params[256]; data/smp-utils-0.99/src/smp_rep_zone_man_pass.c:129: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 i_params[256]; data/smp-utils-0.99/src/smp_rep_zone_man_pass.c:130: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 device_name[512]; data/smp-utils-0.99/src/smp_rep_zone_man_pass.c:131: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/smp-utils-0.99/src/smp_rep_zone_man_pass.c:346:21: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). foutp = fopen(fpass, "w"); data/smp-utils-0.99/src/smp_rep_zone_perm_tbl.c:188:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char i_params[256]; data/smp-utils-0.99/src/smp_rep_zone_perm_tbl.c:189:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char device_name[512]; data/smp-utils-0.99/src/smp_rep_zone_perm_tbl.c:190:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char b[256]; data/smp-utils-0.99/src/smp_rep_zone_perm_tbl.c:351:21: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). foutp = fopen(permf, (do_append ? "a" : "w")); data/smp-utils-0.99/src/smp_write_gpio.c:136: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[1024]; data/smp-utils-0.99/src/smp_write_gpio.c:245: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/smp-utils-0.99/src/smp_write_gpio.c:246: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 i_params[256]; data/smp-utils-0.99/src/smp_write_gpio.c:247: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 device_name[512]; data/smp-utils-0.99/src/smp_zone_activate.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[256]; data/smp-utils-0.99/src/smp_zone_activate.c:123: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 device_name[512]; data/smp-utils-0.99/src/smp_zone_activate.c:124:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char i_params[256]; data/smp-utils-0.99/src/smp_zone_lock.c:134:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char line[512]; data/smp-utils-0.99/src/smp_zone_lock.c:144:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(fname, "r"); data/smp-utils-0.99/src/smp_zone_lock.c:252: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(mp_arr + off, lcp + 1, k); data/smp-utils-0.99/src/smp_zone_lock.c:295: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/smp-utils-0.99/src/smp_zone_lock.c:296: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 device_name[512]; data/smp-utils-0.99/src/smp_zone_lock.c:297: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 i_params[256]; data/smp-utils-0.99/src/smp_zone_lock.c:354: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(password , optarg, len); data/smp-utils-0.99/src/smp_zone_lock.c:451: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(smp_req + 8, password, 32); data/smp-utils-0.99/src/smp_zone_unlock.c:127: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/smp-utils-0.99/src/smp_zone_unlock.c:128: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 device_name[512]; data/smp-utils-0.99/src/smp_zone_unlock.c:129: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 i_params[256]; data/smp-utils-0.99/src/smp_zoned_broadcast.c:128: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/smp-utils-0.99/src/smp_zoned_broadcast.c:138:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(fname, "r"); data/smp-utils-0.99/src/smp_zoned_broadcast.c:242: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/smp-utils-0.99/src/smp_zoned_broadcast.c:243: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 device_name[512]; data/smp-utils-0.99/src/smp_zoned_broadcast.c:244: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 i_params[256]; data/smp-utils-0.99/lib/smp_fre_cam.c:77:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(tobj->device_name, device_name, SMP_MAX_DEVICE_NAME); data/smp-utils-0.99/lib/smp_lib.c:141: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/smp-utils-0.99/lib/smp_lib.c:438:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). n = strlen(buff); data/smp-utils-0.99/lib/smp_lib.c:519: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/smp-utils-0.99/lib/smp_lib.c:666: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/smp-utils-0.99/lib/smp_lib.c:888: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/smp-utils-0.99/lib/smp_lib.c:968: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/smp-utils-0.99/lib/smp_lib.c:1004: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/smp-utils-0.99/lib/smp_lib.c:1100: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/smp-utils-0.99/lib/smp_lin_bsg.c:114:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(dev_name) > sizeof(buff)) { data/smp-utils-0.99/lib/smp_lin_bsg.c:122: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(buff); data/smp-utils-0.99/lib/smp_lin_bsg.c:130:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buff + len, dev_name, sizeof(buff) - len); data/smp-utils-0.99/lib/smp_lin_bsg.c:132:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buff, dev_name, sizeof(buff)); data/smp-utils-0.99/lib/smp_lin_bsg.c:134:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ('/' == buff[strlen(buff) - 1]) data/smp-utils-0.99/lib/smp_lin_bsg.c:135: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). buff[strlen(buff) - 1] = '\0'; data/smp-utils-0.99/lib/smp_lin_bsg.c:177:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(dev_name) > sizeof(buff)) { data/smp-utils-0.99/lib/smp_lin_bsg.c:185: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(buff); data/smp-utils-0.99/lib/smp_lin_bsg.c:193:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buff + len, dev_name, sizeof(buff) - len); data/smp-utils-0.99/lib/smp_lin_bsg.c:195:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buff, dev_name, sizeof(buff)); data/smp-utils-0.99/lib/smp_lin_bsg.c:197:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ('/' == buff[strlen(buff) - 1]) data/smp-utils-0.99/lib/smp_lin_bsg.c:198: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). buff[strlen(buff) - 1] = '\0'; data/smp-utils-0.99/lib/smp_lin_sel.c:59:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(tobj->device_name, device_name, SMP_MAX_DEVICE_NAME); data/smp-utils-0.99/lib/smp_sol_usmp.c:67:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(tobj->device_name, device_name, SMP_MAX_DEVICE_NAME); data/smp-utils-0.99/src/smp_conf_general.c:216:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(i_params, optarg, sizeof(i_params)); data/smp-utils-0.99/src/smp_conf_general.c:298:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device_name, argv[optind], sizeof(device_name) - 1); data/smp-utils-0.99/src/smp_conf_general.c:312:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device_name, cp, sizeof(device_name) - 1); data/smp-utils-0.99/src/smp_conf_phy_event.c:234: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). in_len = strlen(inp); data/smp-utils-0.99/src/smp_conf_phy_event.c:292: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). in_len = strlen(inp); data/smp-utils-0.99/src/smp_conf_phy_event.c:350: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). have_stdin = ((1 == strlen(file_name)) && ('-' == file_name[0])); data/smp-utils-0.99/src/smp_conf_phy_event.c:364: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/smp-utils-0.99/src/smp_conf_phy_event.c:523:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(i_params, optarg, sizeof(i_params)); data/smp-utils-0.99/src/smp_conf_phy_event.c:572:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device_name, argv[optind], sizeof(device_name) - 1); data/smp-utils-0.99/src/smp_conf_phy_event.c:593:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device_name, cp, sizeof(device_name) - 1); data/smp-utils-0.99/src/smp_conf_route_info.c:178:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(i_params, optarg, sizeof(i_params)); data/smp-utils-0.99/src/smp_conf_route_info.c:229:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device_name, argv[optind], sizeof(device_name) - 1); data/smp-utils-0.99/src/smp_conf_route_info.c:243:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device_name, cp, sizeof(device_name) - 1); data/smp-utils-0.99/src/smp_conf_zone_man_pass.c:153: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/smp-utils-0.99/src/smp_conf_zone_man_pass.c:169: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/smp-utils-0.99/src/smp_conf_zone_man_pass.c:357:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(i_params, optarg, sizeof(i_params)); data/smp-utils-0.99/src/smp_conf_zone_man_pass.c:361: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). len = (int)strlen(optarg); data/smp-utils-0.99/src/smp_conf_zone_man_pass.c:373: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). len = (int)strlen(optarg); data/smp-utils-0.99/src/smp_conf_zone_man_pass.c:413:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device_name, argv[optind], sizeof(device_name) - 1); data/smp-utils-0.99/src/smp_conf_zone_man_pass.c:427:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device_name, cp, sizeof(device_name) - 1); data/smp-utils-0.99/src/smp_conf_zone_perm_tbl.c:160: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/smp-utils-0.99/src/smp_conf_zone_perm_tbl.c:176: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/smp-utils-0.99/src/smp_conf_zone_perm_tbl.c:360:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(i_params, optarg, sizeof(i_params)); data/smp-utils-0.99/src/smp_conf_zone_perm_tbl.c:413:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device_name, argv[optind], sizeof(device_name) - 1); data/smp-utils-0.99/src/smp_conf_zone_perm_tbl.c:427:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device_name, cp, sizeof(device_name) - 1); data/smp-utils-0.99/src/smp_conf_zone_phy_info.c:134: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/smp-utils-0.99/src/smp_conf_zone_phy_info.c:150: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/smp-utils-0.99/src/smp_conf_zone_phy_info.c:297:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(i_params, optarg, sizeof(i_params)); data/smp-utils-0.99/src/smp_conf_zone_phy_info.c:335:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device_name, argv[optind], sizeof(device_name) - 1); data/smp-utils-0.99/src/smp_conf_zone_phy_info.c:349:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device_name, cp, sizeof(device_name) - 1); data/smp-utils-0.99/src/smp_discover.c:1238:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(i_params, optarg, sizeof(i_params)); data/smp-utils-0.99/src/smp_discover.c:1299:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device_name, argv[optind], sizeof(device_name) - 1); data/smp-utils-0.99/src/smp_discover.c:1314:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device_name, cp, sizeof(device_name) - 1); data/smp-utils-0.99/src/smp_discover_list.c:1175:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(i_params, optarg, sizeof(i_params)); data/smp-utils-0.99/src/smp_discover_list.c:1233:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device_name, argv[optind], sizeof(device_name) - 1); data/smp-utils-0.99/src/smp_discover_list.c:1247:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device_name, cp, sizeof(device_name) - 1); data/smp-utils-0.99/src/smp_discover_list.c:1347:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((1 == strlen(op->zpi_fn)) && (0 == strcmp("-", op->zpi_fn))) data/smp-utils-0.99/src/smp_ena_dis_zoning.c:185:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(i_params, optarg, sizeof(i_params)); data/smp-utils-0.99/src/smp_ena_dis_zoning.c:220:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device_name, argv[optind], sizeof(device_name) - 1); data/smp-utils-0.99/src/smp_ena_dis_zoning.c:234:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device_name, cp, sizeof(device_name) - 1); data/smp-utils-0.99/src/smp_phy_control.c:259:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(i_params, optarg, sizeof(i_params)); data/smp-utils-0.99/src/smp_phy_control.c:384:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device_name, argv[optind], sizeof(device_name) - 1); data/smp-utils-0.99/src/smp_phy_control.c:398:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device_name, cp, sizeof(device_name) - 1); data/smp-utils-0.99/src/smp_phy_test.c:217:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(i_params, optarg, sizeof(i_params)); data/smp-utils-0.99/src/smp_phy_test.c:280:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device_name, argv[optind], sizeof(device_name) - 1); data/smp-utils-0.99/src/smp_phy_test.c:294:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device_name, cp, sizeof(device_name) - 1); data/smp-utils-0.99/src/smp_read_gpio.c:187:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(i_params, optarg, sizeof(i_params)); data/smp-utils-0.99/src/smp_read_gpio.c:232:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device_name, argv[optind], sizeof(device_name) - 1); data/smp-utils-0.99/src/smp_read_gpio.c:246:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device_name, cp, sizeof(device_name) - 1); data/smp-utils-0.99/src/smp_rep_broadcast.c:185:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(i_params, optarg, sizeof(i_params)); data/smp-utils-0.99/src/smp_rep_broadcast.c:213:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device_name, argv[optind], sizeof(device_name) - 1); data/smp-utils-0.99/src/smp_rep_broadcast.c:227:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device_name, cp, sizeof(device_name) - 1); data/smp-utils-0.99/src/smp_rep_exp_route_tbl.c:283:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(i_params, optarg, sizeof(i_params)); data/smp-utils-0.99/src/smp_rep_exp_route_tbl.c:326:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device_name, argv[optind], sizeof(device_name) - 1); data/smp-utils-0.99/src/smp_rep_exp_route_tbl.c:340:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device_name, cp, sizeof(device_name) - 1); data/smp-utils-0.99/src/smp_rep_general.c:169:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(i_params, optarg, sizeof(i_params)); data/smp-utils-0.99/src/smp_rep_general.c:200:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device_name, argv[optind], sizeof(device_name) - 1); data/smp-utils-0.99/src/smp_rep_general.c:214:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device_name, cp, sizeof(device_name) - 1); data/smp-utils-0.99/src/smp_rep_manufacturer.c:152:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(i_params, optarg, sizeof(i_params)); data/smp-utils-0.99/src/smp_rep_manufacturer.c:183:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device_name, argv[optind], sizeof(device_name) - 1); data/smp-utils-0.99/src/smp_rep_manufacturer.c:197:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device_name, cp, sizeof(device_name) - 1); data/smp-utils-0.99/src/smp_rep_phy_err_log.c:155:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(i_params, optarg, sizeof(i_params)); data/smp-utils-0.99/src/smp_rep_phy_err_log.c:195:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device_name, argv[optind], sizeof(device_name) - 1); data/smp-utils-0.99/src/smp_rep_phy_err_log.c:209:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device_name, cp, sizeof(device_name) - 1); data/smp-utils-0.99/src/smp_rep_phy_event.c:184: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(pnp->pes_name); data/smp-utils-0.99/src/smp_rep_phy_event.c:340:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(i_params, optarg, sizeof(i_params)); data/smp-utils-0.99/src/smp_rep_phy_event.c:380:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device_name, argv[optind], sizeof(device_name) - 1); data/smp-utils-0.99/src/smp_rep_phy_event.c:402:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device_name, cp, sizeof(device_name) - 1); data/smp-utils-0.99/src/smp_rep_phy_event_list.c:193: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(pnp->pes_name); data/smp-utils-0.99/src/smp_rep_phy_event_list.c:219:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). memset(b, ' ', strlen(b)); data/smp-utils-0.99/src/smp_rep_phy_event_list.c:364:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(i_params, optarg, sizeof(i_params)); data/smp-utils-0.99/src/smp_rep_phy_event_list.c:398:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device_name, argv[optind], sizeof(device_name) - 1); data/smp-utils-0.99/src/smp_rep_phy_event_list.c:419:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device_name, cp, sizeof(device_name) - 1); data/smp-utils-0.99/src/smp_rep_phy_sata.c:170:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(i_params, optarg, sizeof(i_params)); data/smp-utils-0.99/src/smp_rep_phy_sata.c:210:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device_name, argv[optind], sizeof(device_name) - 1); data/smp-utils-0.99/src/smp_rep_phy_sata.c:224:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device_name, cp, sizeof(device_name) - 1); data/smp-utils-0.99/src/smp_rep_route_info.c:353:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(i_params, optarg, sizeof(i_params)); data/smp-utils-0.99/src/smp_rep_route_info.c:403:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device_name, argv[optind], sizeof(device_name) - 1); data/smp-utils-0.99/src/smp_rep_route_info.c:417:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device_name, cp, sizeof(device_name) - 1); data/smp-utils-0.99/src/smp_rep_self_conf_stat.c:168:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buff, cp, buff_len - 1); data/smp-utils-0.99/src/smp_rep_self_conf_stat.c:234:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(i_params, optarg, sizeof(i_params)); data/smp-utils-0.99/src/smp_rep_self_conf_stat.c:268:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device_name, argv[optind], sizeof(device_name) - 1); data/smp-utils-0.99/src/smp_rep_self_conf_stat.c:282:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device_name, cp, sizeof(device_name) - 1); data/smp-utils-0.99/src/smp_rep_zone_man_pass.c:163:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(i_params, optarg, sizeof(i_params)); data/smp-utils-0.99/src/smp_rep_zone_man_pass.c:201:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device_name, argv[optind], sizeof(device_name) - 1); data/smp-utils-0.99/src/smp_rep_zone_man_pass.c:215:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device_name, cp, sizeof(device_name) - 1); data/smp-utils-0.99/src/smp_rep_zone_man_pass.c:343:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((1 == strlen(fpass)) && (0 == strcmp("-", fpass))) data/smp-utils-0.99/src/smp_rep_zone_man_pass.c:373: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((const char *)(smp_resp + 8)); data/smp-utils-0.99/src/smp_rep_zone_perm_tbl.c:232:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(i_params, optarg, sizeof(i_params)); data/smp-utils-0.99/src/smp_rep_zone_perm_tbl.c:287:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device_name, argv[optind], sizeof(device_name) - 1); data/smp-utils-0.99/src/smp_rep_zone_perm_tbl.c:301:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device_name, cp, sizeof(device_name) - 1); data/smp-utils-0.99/src/smp_rep_zone_perm_tbl.c:348:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((1 == strlen(permf)) && (0 == strcmp("-", permf))) data/smp-utils-0.99/src/smp_write_gpio.c:141: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). in_len = strlen(inp); data/smp-utils-0.99/src/smp_write_gpio.c:149:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). in_len = strlen(line); data/smp-utils-0.99/src/smp_write_gpio.c:301:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(i_params, optarg, sizeof(i_params)); data/smp-utils-0.99/src/smp_write_gpio.c:346:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device_name, argv[optind], sizeof(device_name) - 1); data/smp-utils-0.99/src/smp_write_gpio.c:370:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device_name, cp, sizeof(device_name) - 1); data/smp-utils-0.99/src/smp_zone_activate.c:156:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(i_params, optarg, sizeof(i_params)); data/smp-utils-0.99/src/smp_zone_activate.c:184:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device_name, argv[optind], sizeof(device_name) - 1); data/smp-utils-0.99/src/smp_zone_activate.c:198:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device_name, cp, sizeof(device_name) - 1); data/smp-utils-0.99/src/smp_zone_lock.c:138: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/smp-utils-0.99/src/smp_zone_lock.c:154: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/smp-utils-0.99/src/smp_zone_lock.c:344:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(i_params, optarg, sizeof(i_params)); data/smp-utils-0.99/src/smp_zone_lock.c:348: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). len = (int)strlen(optarg); data/smp-utils-0.99/src/smp_zone_lock.c:381:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device_name, argv[optind], sizeof(device_name) - 1); data/smp-utils-0.99/src/smp_zone_lock.c:395:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device_name, ccp, sizeof(device_name) - 1); data/smp-utils-0.99/src/smp_zone_unlock.c:164:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(i_params, optarg, sizeof(i_params)); data/smp-utils-0.99/src/smp_zone_unlock.c:192:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device_name, argv[optind], sizeof(device_name) - 1); data/smp-utils-0.99/src/smp_zone_unlock.c:206:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device_name, cp, sizeof(device_name) - 1); data/smp-utils-0.99/src/smp_zoned_broadcast.c:132: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/smp-utils-0.99/src/smp_zoned_broadcast.c:148: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/smp-utils-0.99/src/smp_zoned_broadcast.c:286:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(i_params, optarg, sizeof(i_params)); data/smp-utils-0.99/src/smp_zoned_broadcast.c:317:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device_name, argv[optind], sizeof(device_name) - 1); data/smp-utils-0.99/src/smp_zoned_broadcast.c:331:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device_name, ccp, sizeof(device_name) - 1); ANALYSIS SUMMARY: Hits = 448 Lines analyzed = 21759 in approximately 0.70 seconds (30957 lines/second) Physical Source Lines of Code (SLOC) = 18155 Hits@level = [0] 957 [1] 137 [2] 210 [3] 89 [4] 12 [5] 0 Hits@level+ = [0+] 1405 [1+] 448 [2+] 311 [3+] 101 [4+] 12 [5+] 0 Hits/KSLOC@level+ = [0+] 77.3891 [1+] 24.6764 [2+] 17.1303 [3+] 5.56321 [4+] 0.660975 [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.