fuse(efence): zero sized memory was being allocated.
For the last call of getdents(), gf_malloc called with 0 size, which is then caught by efence. BUG: 782760 Change-Id: If289029117a62ecfcecc70480e5ac8f0e050487d Signed-off-by: Anand Avati <avati@redhat.com> Original-author: Varun Shastry <vshastry@redhat.com> Reviewed-on: http://review.gluster.org/3846 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
This commit is contained in:
parent
e8d09b9ab9
commit
765fdd0809
@ -2457,6 +2457,11 @@ fuse_readdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
|
||||
strlen (entry->d_name));
|
||||
}
|
||||
|
||||
if (size <= 0) {
|
||||
send_fuse_data (this, finh, 0, 0);
|
||||
goto out;
|
||||
}
|
||||
|
||||
buf = GF_CALLOC (1, size, gf_fuse_mt_char);
|
||||
if (!buf) {
|
||||
gf_log ("glusterfs-fuse", GF_LOG_DEBUG,
|
||||
|
Loading…
x
Reference in New Issue
Block a user