Commit 4467bedb authored by Peter Jansweijer's avatar Peter Jansweijer

sfp add has wrong parameter amount check

parent ac9751d7
Pipeline #3717 failed with stage
in 1 minute and 21 seconds
...@@ -89,7 +89,7 @@ static int cmd_sfp(const char *args[]) ...@@ -89,7 +89,7 @@ static int cmd_sfp(const char *args[])
return -EIO; return -EIO;
} }
return 0; return 0;
} else if (args[5] && !strcasecmp(args[0], "add")) { } else if (args[4] && !strcasecmp(args[0], "add")) {
temp = strnlen(args[1], SFP_PN_LEN); temp = strnlen(args[1], SFP_PN_LEN);
for (i = 0; i < temp; ++i) for (i = 0; i < temp; ++i)
sfp.pn[i] = args[1][i]; sfp.pn[i] = args[1][i];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment