]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
test/libcephfs: avoid buffer overflow when testing ceph_getdents() 13429/head
authorYan, Zheng <zyan@redhat.com>
Wed, 15 Feb 2017 03:45:26 +0000 (11:45 +0800)
committerYan, Zheng <zyan@redhat.com>
Wed, 15 Feb 2017 04:01:22 +0000 (12:01 +0800)
commitfa6671345b8f3a82dcd232f99e55a982b0a641f1
treead61ff9a4902e5f971b725f8c954aeacf6646bdd
parent05f1a1987e663f418cb9549203d7eadb450541ef
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>
src/test/libcephfs/test.cc