]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
libcephfs.cc: fix possible NULL pointer deref
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Sat, 10 May 2014 22:36:20 +0000 (00:36 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Sat, 10 May 2014 22:36:20 +0000 (00:36 +0200)
commita121d014610d2dc7aa096d7fdce003b9784e1af0
tree6146f7e2bb1cbb2e573a15beb7d1aa26af229d2b
parent94773aca7784989f0d9b3b2677e393fe856c6f70
libcephfs.cc: fix possible NULL pointer deref

Fix possible NULL pointer dereference of 'inode' in ceph_ll_lookup_inode().
It's not enough to check for 'inode' without assert or error handling before
assert for '*inode != NULL' since this doesn't handle the 'inode == NULL'
case for the later calls.

Fix for:
1192 r = (cmount->get_client())->lookup_parent(*inode, &parent);
     5  Dereference of null pointer (loaded from variable 'inode')

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/libcephfs.cc