From: Andreas Schneider Date: Mon, 9 Dec 2019 09:45:31 +0000 (+0100) Subject: s3:smbd: Fix possible NULL deref in smbd_do_qfilepathinfo() X-Git-Tag: ldb-2.1.0~369 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8753d5f4567e1bc39c25ea11d444bed6d0afea46;p=thirdparty%2Fsamba.git s3:smbd: Fix possible NULL deref in smbd_do_qfilepathinfo() Found by covscan. Signed-off-by: Andreas Schneider Reviewed-by: Richard Sharpe Reviewed-by: Andrew Bartlett --- diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 9c77b32ee68..2cf669f4b4d 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -5531,7 +5531,7 @@ NTSTATUS smbd_do_qfilepathinfo(connection_struct *conn, { char *nfname = NULL; - if (!fsp->conn->sconn->using_smb2) { + if (fsp == NULL || !fsp->conn->sconn->using_smb2) { return NT_STATUS_INVALID_LEVEL; }