]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: fix NULL dereference in match_prepath
authorRonnie Sahlberg <lsahlber@redhat.com>
Wed, 22 Jan 2020 01:07:56 +0000 (11:07 +1000)
committerSteve French <stfrench@microsoft.com>
Mon, 27 Jan 2020 01:24:17 +0000 (19:24 -0600)
commit32711d5e54622a104c1c283478c15e5d7eaf65c5
tree88ab712c9db2ed0b3c8efd46ec6c2e5800241cbe
parent4d296426cd5029295bf42a37afb48a34c5c60591
cifs: fix NULL dereference in match_prepath

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>
fs/cifs/connect.c