diff options
-rw-r--r-- | tools/fit_check_sign.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/fit_check_sign.c b/tools/fit_check_sign.c index d6d93400949..817773d48a0 100644 --- a/tools/fit_check_sign.c +++ b/tools/fit_check_sign.c @@ -42,12 +42,13 @@ int main(int argc, char **argv) void *fit_blob; char *fdtfile = NULL; char *keyfile = NULL; - char cmdname[50]; + char cmdname[256]; int ret; void *key_blob; int c; - strcpy(cmdname, *argv); + strncpy(cmdname, *argv, sizeof(cmdname) - 1); + cmdname[sizeof(cmdname) - 1] = '\0'; while ((c = getopt(argc, argv, "f:k:")) != -1) switch (c) { case 'f': |