From 2cb074e4c1a79337bcdd8f8bad779ee2dc9a850b Mon Sep 17 00:00:00 2001 From: Rose Date: Wed, 22 May 2024 19:03:32 -0400 Subject: [PATCH] Exit early if we strlen on an empty string In the event we do strlen on an empty string, we should bail. Signed-off-by: Rose --- pppd/auth.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pppd/auth.c b/pppd/auth.c index ecd30bad..642c3096 100644 --- a/pppd/auth.c +++ b/pppd/auth.c @@ -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))