Skip to content

Commit

Permalink
Prevent l from becoming negative if strlen returns 0
Browse files Browse the repository at this point in the history
  • Loading branch information
AtariDreams committed May 22, 2024
1 parent 04e6b8d commit cdda23f
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 cdda23f

Please sign in to comment.