diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-08-15 12:17:09 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-08-15 12:17:09 +0200 |
commit | 7eb40d6ea67dbc1178c1fd964e8a76de2e1a3e7c (patch) | |
tree | 1aa21a94424bdbe5f53c3a6037f45673465bda11 /fs/smb/client/cifsencrypt.c | |
parent | ebbbf3c8df3ab52219c2b21e0d37e02acea2510d (diff) | |
parent | cb1830ee48ef7b444b20dd66493b0719ababd2b1 (diff) |
Merge v6.15.10linux-rolling-stable
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/smb/client/cifsencrypt.c')
-rw-r--r-- | fs/smb/client/cifsencrypt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/smb/client/cifsencrypt.c b/fs/smb/client/cifsencrypt.c index 35892df7335c7..6be850d2a3467 100644 --- a/fs/smb/client/cifsencrypt.c +++ b/fs/smb/client/cifsencrypt.c @@ -343,7 +343,7 @@ static struct ntlmssp2_name *find_next_av(struct cifs_ses *ses, len = AV_LEN(av); if (AV_TYPE(av) == NTLMSSP_AV_EOL) return NULL; - if (!len || (u8 *)av + sizeof(*av) + len > end) + if ((u8 *)av + sizeof(*av) + len > end) return NULL; return av; } @@ -363,7 +363,7 @@ static int find_av_name(struct cifs_ses *ses, u16 type, char **name, u16 maxlen) av_for_each_entry(ses, av) { len = AV_LEN(av); - if (AV_TYPE(av) != type) + if (AV_TYPE(av) != type || !len) continue; if (!IS_ALIGNED(len, sizeof(__le16))) { cifs_dbg(VFS | ONCE, "%s: bad length(%u) for type %u\n", |