Skip to content

Commit d8a9a4b

Browse files
committed
Merge tag 'v7.0-rc6-smb3-client-fix' of git://git.samba.org/sfrench/cifs-2.6
Pull smb client fix from Steve French: - Fix potential out of bounds read in mount * tag 'v7.0-rc6-smb3-client-fix' of git://git.samba.org/sfrench/cifs-2.6: fs/smb/client: fix out-of-bounds read in cifs_sanitize_prepath
2 parents 7b9e74c + 78ec5bf commit d8a9a4b

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

fs/smb/client/fs_context.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -588,6 +588,10 @@ char *cifs_sanitize_prepath(char *prepath, gfp_t gfp)
588588
while (IS_DELIM(*cursor1))
589589
cursor1++;
590590

591+
/* exit in case of only delimiters */
592+
if (!*cursor1)
593+
return NULL;
594+
591595
/* copy the first letter */
592596
*cursor2 = *cursor1;
593597

0 commit comments

Comments
 (0)