]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
libcephfs: Check that buffer is non-null
authorSam Lang <sam.lang@inktank.com>
Tue, 9 Oct 2012 14:11:37 +0000 (09:11 -0500)
committerSam Lang <sam.lang@inktank.com>
Tue, 9 Oct 2012 14:17:08 +0000 (09:17 -0500)
Signed-off-by: Sam Lang <sam.lang@inktank.com>
src/libcephfs.cc

index 3c9feb0f67a94c035624b8d84cce0d98b9efba8f..f4e4ad0b03efa874922057d4fe622fb422d69809 100644 (file)
@@ -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);
 }