summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/fit_info.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/fit_info.c b/tools/fit_info.c
index 481ac6dd81..652abcd2bd 100644
--- a/tools/fit_info.c
+++ b/tools/fit_info.c
@@ -48,10 +48,11 @@ int main(int argc, char **argv)
char *fdtfile = NULL;
char *nodename = NULL;
char *propertyname = NULL;
- char cmdname[50];
+ char cmdname[256];
int c;
- strcpy(cmdname, *argv);
+ strncpy(cmdname, *argv, sizeof(cmdname) - 1);
+ cmdname[sizeof(cmdname) - 1] = '\0';
while ((c = getopt(argc, argv, "f:n:p:")) != -1)
switch (c) {
case 'f':
OpenPOWER on IntegriCloud