]> git.itanic.dy.fi Git - linux-stable/commit
cifs: fix NULL dereference in match_prepath
authorRonnie Sahlberg <lsahlber@redhat.com>
Wed, 22 Jan 2020 01:07:56 +0000 (11:07 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 28 Feb 2020 15:36:07 +0000 (16:36 +0100)
commite534bec3712fc768f133defd6303353087bf90c8
tree0d94240ee0fdab8ddc3bd14beed1bda1f5af15ab
parent8fcb294f77535fc14b050879c7817f36df3a4a6f
cifs: fix NULL dereference in match_prepath

[ Upstream commit fe1292686333d1dadaf84091f585ee903b9ddb84 ]

RHBZ: 1760879

Fix an oops in match_prepath() by making sure that the prepath string is not
NULL before we pass it into strcmp().

This is similar to other checks we make for example in cifs_root_iget()

Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/cifs/connect.c