Skip to content

Commit

Permalink
Exit early if we strlen on an empty string
Browse files Browse the repository at this point in the history
In the event we do strlen on an empty string, we should bail.
Signed-off-by: Rose <[email protected]>
  • Loading branch information
AtariDreams committed May 22, 2024
1 parent 04e6b8d commit 2cb074e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pppd/auth.c
Original file line number Diff line number Diff line change
Expand Up @@ -2164,6 +2164,8 @@ auth_number(void)
while (wp) {
/* trailing '*' wildcard */
l = strlen(wp->word);
if (l == 0)
return 1;
if ((wp->word)[l - 1] == '*')
l--;
if (!strncasecmp(wp->word, remote_number, l))
Expand Down

0 comments on commit 2cb074e

Please sign in to comment.