2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 06:15:37 +00:00

fixed deref of nil pointer if no args

This commit is contained in:
Todd C. Miller
1995-09-23 16:05:40 +00:00
parent 13b5f7de94
commit 4b3c1201e6

View File

@@ -533,9 +533,14 @@ void inform_user(code)
break;
case VALIDATE_NOT_OK:
(void) fprintf(stderr,
"Sorry, user %s is not allowed to execute \"%s %s\" on %s.\n\n",
user, cmnd, cmnd_args, host);
if (cmnd_args)
(void) fprintf(stderr,
"Sorry, user %s is not allowed to execute \"%s %s\" on %s.\n\n",
user, cmnd, cmnd_args, host);
else
(void) fprintf(stderr,
"Sorry, user %s is not allowed to execute \"%s\" on %s.\n\n",
user, cmnd, host);
break;
case VALIDATE_ERROR: