nfs-ganesha/nfs-ganesha-2.0.0-fsal_ceph.patch

19 lines
743 B
Diff
Raw Normal View History

2014-06-02 06:19:34 +00:00
--- nfs-ganesha-2.0.0/src/FSAL/FSAL_CEPH/handle.c.orig 2014-06-02 01:49:21.711983531 -0400
+++ nfs-ganesha-2.0.0/src/FSAL/FSAL_CEPH/handle.c 2014-06-02 01:50:57.119983531 -0400
@@ -374,12 +374,13 @@
/* The private 'full' directory handle */
struct handle *link = container_of(link_pub, struct handle, handle);
/* Pointer to the Ceph link content */
- char *content = NULL;
+ char content[4096] = {0,};
/* Content points into a static buffer in the Ceph client's
cache, so we don't have to free it. */
- rc = ceph_ll_readlink(export->cmount, link->i, &content, 0, 0);
+ rc = ceph_ll_readlink(export->cmount, link->i,
+ content, sizeof content, 0, 0);
if (rc < 0)
return ceph2fsal_error(rc);