summaryrefslogtreecommitdiff
path: root/source4/ntvfs/common
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-05-22 06:18:40 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:08:21 -0500
commit225d6485eb896bfa50b564aabfe20967edd008e4 (patch)
tree235e69675a9dd3c616280516d540a965005e4aa8 /source4/ntvfs/common
parent00e772d747ca9c28961c11bc2ed10cd800c6b0d9 (diff)
downloadsamba-225d6485eb896bfa50b564aabfe20967edd008e4.tar.gz
samba-225d6485eb896bfa50b564aabfe20967edd008e4.tar.bz2
samba-225d6485eb896bfa50b564aabfe20967edd008e4.zip
r15797: fixed a notify bug, where a notify_remove() is beyond the current max
depth (This used to be commit 2ebcfcc6dadd4a420431c733bb12fe7719057fd6)
Diffstat (limited to 'source4/ntvfs/common')
-rw-r--r--source4/ntvfs/common/notify.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source4/ntvfs/common/notify.c b/source4/ntvfs/common/notify.c
index 2d880dd5c4..57cbce3863 100644
--- a/source4/ntvfs/common/notify.c
+++ b/source4/ntvfs/common/notify.c
@@ -447,6 +447,11 @@ NTSTATUS notify_remove(struct notify_context *notify, void *private)
return status;
}
+ if (depth >= notify->array->num_depths) {
+ notify_unlock(notify);
+ return NT_STATUS_OBJECT_NAME_NOT_FOUND;
+ }
+
/* we only have to search at the depth of this element */
d = &notify->array->depth[depth];