diff options
author | Jeremy Allison <jra@samba.org> | 2014-09-03 07:54:51 -0700 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2014-09-08 10:00:32 +0200 |
commit | 5475d5e511744a37346a38438679c2c987d91343 (patch) | |
tree | 41acd7b0d49429f5b5447291efbb0d5b26ef79ec | |
parent | f165bb9b53baa70703f65c6de940a5a152956b1c (diff) | |
download | samba-5475d5e511744a37346a38438679c2c987d91343.tar.gz |
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 <jra@samba.org>
Reviewed-by: Ronnie Sahlberg <ronniesahlberg.gmail.com>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Sep 3 19:59:54 CEST 2014 on sn-devel-104
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10794
vfs_dirsort has an off-by-one error that can cause uninitialized memory read
Autobuild-User(v4-1-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-1-test): Mon Sep 8 10:00:32 CEST 2014 on sn-devel-104
-rw-r--r-- | source3/modules/vfs_dirsort.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/modules/vfs_dirsort.c b/source3/modules/vfs_dirsort.c index 98109c280b..d6b33941fa 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; |