diff options
| author | Leo Stone <leocstone@gmail.com> | 2025-07-21 15:29:12 +0100 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2025-07-23 13:54:05 +0200 |
| commit | 9aa64182952db7d931201ab4fcdf767c11fb4ab0 (patch) | |
| tree | c9434eaaf8d59d4785879dd8cd0bf6f6e758909b /fs/afs | |
| parent | Linux 6.16-rc7 (diff) | |
| download | linux-9aa64182952db7d931201ab4fcdf767c11fb4ab0.tar.gz linux-9aa64182952db7d931201ab4fcdf767c11fb4ab0.zip | |
afs: Fix check for NULL terminator
Add a missing check for reaching the end of the string while attempting
to split a command.
Fixes: f94f70d39cc2 ("afs: Provide a way to configure address priorities")
Reported-by: syzbot+7741f872f3c53385a2e2@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=7741f872f3c53385a2e2
Signed-off-by: Leo Stone <leocstone@gmail.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Link: https://lore.kernel.org/4119428.1753108152@warthog.procyon.org.uk
Acked-by: David Howells <dhowells@redhat.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: linux-afs@lists.infradead.org
cc: linux-fsdevel@vger.kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/afs')
| -rw-r--r-- | fs/afs/addr_prefs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/afs/addr_prefs.c b/fs/afs/addr_prefs.c index c0384201b8fe..133736412c3d 100644 --- a/fs/afs/addr_prefs.c +++ b/fs/afs/addr_prefs.c @@ -48,7 +48,7 @@ static int afs_split_string(char **pbuf, char *strv[], unsigned int maxstrv) strv[count++] = p; /* Skip over word */ - while (!isspace(*p)) + while (!isspace(*p) && *p) p++; if (!*p) break; |
