git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d654782
)
Fix Coverity CID 929. Potential NULL deref after code refactoring.
author
Jeremy Allison
<jra@samba.org>
Sat, 18 Jul 2009 04:36:55 +0000
(21:36 -0700)
committer
Jeremy Allison
<jra@samba.org>
Sat, 18 Jul 2009 04:36:55 +0000
(21:36 -0700)
Jeremy.
source3/smbd/trans2.c
patch
|
blob
|
history
diff --git
a/source3/smbd/trans2.c
b/source3/smbd/trans2.c
index cb76deb90ae31bd3ebd0f51c6a6459d12415063f..7a0feea29171660d2c36ad383161a8203ce8af41 100644
(file)
--- 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;
}