From 225d6485eb896bfa50b564aabfe20967edd008e4 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 22 May 2006 06:18:40 +0000 Subject: r15797: fixed a notify bug, where a notify_remove() is beyond the current max depth (This used to be commit 2ebcfcc6dadd4a420431c733bb12fe7719057fd6) --- source4/ntvfs/common/notify.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source4/ntvfs/common') 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 = ¬ify->array->depth[depth]; -- cgit