summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--uhubctl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/uhubctl.c b/uhubctl.c
index 0321972..67c7fcb 100644
--- a/uhubctl.c
+++ b/uhubctl.c
@@ -919,16 +919,16 @@ int main(int argc, char *argv[])
printf("\n");
break;
case 'l':
- strncpy(opt_location, optarg, sizeof(opt_location));
+ snprintf(opt_location, sizeof(opt_location), "%s", optarg);
break;
case 'L':
opt_level = atoi(optarg);
break;
case 'n':
- strncpy(opt_vendor, optarg, sizeof(opt_vendor));
+ snprintf(opt_vendor, sizeof(opt_vendor), "%s", optarg);
break;
case 's':
- strncpy(opt_search, optarg, sizeof(opt_search));
+ snprintf(opt_search, sizeof(opt_search), "%s", optarg);
break;
case 'p':
if (!strcasecmp(optarg, "all")) { /* all ports is the default */