]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
test/libcephfs: avoid buffer overflow when testing ceph_getdents() 14571/head
authorYan, Zheng <zyan@redhat.com>
Wed, 15 Feb 2017 03:45:26 +0000 (11:45 +0800)
committerNathan Cutler <ncutler@suse.com>
Fri, 14 Apr 2017 21:54:00 +0000 (23:54 +0200)
commit473ad4ea2a35c74d89605b5579a4ff3866134c2d
tree55de3d56b169fc0fa05a0fac5f04714857e3cfbc
parenteb84959bac369dbb86674f9e4225ba1c836c104c
test/libcephfs: avoid buffer overflow when testing ceph_getdents()

The buffer size should be at least "2 * sizeof(struct dirent)".
Otherwise, the code that checks dentry '..' overflow.

Fixes: http://tracker.ceph.com/issues/18941
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
(cherry picked from commit fa6671345b8f3a82dcd232f99e55a982b0a641f1)
src/test/libcephfs/test.cc