From 7f976f42c471b3297236081c6bc0e790dc9ea69f Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 3 Sep 2014 07:54:51 -0700 Subject: [PATCH] s3: smbd: vfs_dirsort module. Fix an off-by-one check that would cause seekdir to seek off the end of the cached array. Signed-off-by: Jeremy Allison Reviewed-by: Ronnie Sahlberg Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Wed Sep 3 19:59:54 CEST 2014 on sn-devel-104 --- source3/modules/vfs_dirsort.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/modules/vfs_dirsort.c b/source3/modules/vfs_dirsort.c index 98109c2..d6b3394 100644 --- a/source3/modules/vfs_dirsort.c +++ b/source3/modules/vfs_dirsort.c @@ -256,7 +256,7 @@ static void dirsort_seekdir(vfs_handle_struct *handle, DIR *dirp, if (data == NULL) { return; } - if (offset > data->number_of_entries) { + if (offset >= data->number_of_entries) { return; } data->pos = offset; -- 1.9.1