diff options
author | Jeremy Allison <jra@samba.org> | 2009-07-17 21:36:55 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2009-07-17 21:36:55 -0700 |
commit | 3036a9c7c12d382b925a1f0e2d6265a3817bd3c4 (patch) | |
tree | 8e367a2065ebf4d7e5fa4d2c0e1646a694c4e024 /source3/smbd | |
parent | d654782806af37ba0d249f695ebecaad2a6ad3a7 (diff) | |
download | samba-3036a9c7c12d382b925a1f0e2d6265a3817bd3c4.tar.gz samba-3036a9c7c12d382b925a1f0e2d6265a3817bd3c4.tar.bz2 samba-3036a9c7c12d382b925a1f0e2d6265a3817bd3c4.zip |
Fix Coverity CID 929. Potential NULL deref after code refactoring.
Jeremy.
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/trans2.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index cb76deb90a..7a0feea291 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -4649,6 +4649,11 @@ NTSTATUS smbd_do_qfilepathinfo(connection_struct *conn, uint32 lock_pid; enum brl_type lock_type; + /* We need an open file with a real fd for this. */ + if (!fsp || fsp->is_directory || fsp->fh->fd == -1) { + return NT_STATUS_INVALID_LEVEL; + } + if (lock_data_count != POSIX_LOCK_DATA_SIZE) { return NT_STATUS_INVALID_PARAMETER; } |