From: Sam Lang Date: Tue, 9 Oct 2012 14:11:37 +0000 (-0500) Subject: libcephfs: Check that buffer is non-null X-Git-Tag: v0.54~69^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3b5b9ef9be7dda663e44dce98526ce5610c69dac;p=ceph.git libcephfs: Check that buffer is non-null Signed-off-by: Sam Lang --- diff --git a/src/libcephfs.cc b/src/libcephfs.cc index 3c9feb0f67a..f4e4ad0b03e 100644 --- a/src/libcephfs.cc +++ b/src/libcephfs.cc @@ -256,6 +256,9 @@ extern "C" int ceph_conf_set(struct ceph_mount_info *cmount, const char *option, extern "C" int ceph_conf_get(struct ceph_mount_info *cmount, const char *option, char *buf, size_t len) { + if (buf == NULL) { + return -EINVAL; + } return cmount->conf_get(option, buf, len); }