summaryrefslogtreecommitdiff
path: root/src/libcephfs.cc
diff options
context:
space:
mode:
authorSam Lang <sam.lang@inktank.com>2012-10-09 09:11:37 -0500
committerSam Lang <sam.lang@inktank.com>2012-10-09 09:17:08 -0500
commit3b5b9ef9be7dda663e44dce98526ce5610c69dac (patch)
tree66f48f4fa972a803723d7b6ba2d1643b0fde55ef /src/libcephfs.cc
parente5de8810e9877c26e46f24e3997dc97316a2e51e (diff)
downloadceph-3b5b9ef9be7dda663e44dce98526ce5610c69dac.tar.gz
libcephfs: Check that buffer is non-null
Signed-off-by: Sam Lang <sam.lang@inktank.com>
Diffstat (limited to 'src/libcephfs.cc')
-rw-r--r--src/libcephfs.cc3
1 files changed, 3 insertions, 0 deletions
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);
}