Skip to content

Commit

Permalink
Ignore NULL user.
Browse files Browse the repository at this point in the history
  • Loading branch information
nicm committed Dec 28, 2019
1 parent 37bea51 commit 8760f8c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lookup.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ user_lookup(const char *user, struct userfunctions *order)
struct userdata *ud;
u_int i;

if (user == NULL)
return (NULL);
for (i = 0; i < ARRAY_LENGTH(order); i++) {
if ((ud = ARRAY_ITEM(order, i)(user)) != NULL)
return (ud);
Expand Down

0 comments on commit 8760f8c

Please sign in to comment.