From 3b5b9ef9be7dda663e44dce98526ce5610c69dac Mon Sep 17 00:00:00 2001 From: Sam Lang Date: Tue, 9 Oct 2012 09:11:37 -0500 Subject: [PATCH] libcephfs: Check that buffer is non-null Signed-off-by: Sam Lang --- src/libcephfs.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/libcephfs.cc b/src/libcephfs.cc index 3c9feb0f67a94..f4e4ad0b03efa 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); } -- 2.39.5