3600960 check the copy of password exists

This commit is contained in:
Ales Ledvinka 2013-01-16 12:17:06 +00:00
parent 28f93df807
commit 6a82e95988

View File

@ -723,7 +723,11 @@ ipmi_user_main(struct ipmi_intf * intf, int argc, char ** argv)
else
password = argv[3];
if (strlen(password) > 20)
if (password == NULL) {
lprintf(LOG_ERR, "Unable to parse password argument.");
return -1;
}
else if (strlen(password) > 20)
{
lprintf(LOG_ERR, "Password is too long (> 20 bytes)");
return -1;