path: root/tests/bugs/fuse
diff options
authorKaleb S KEITHLEY <>2016-03-06 08:32:52 -0500
committerJeff Darcy <>2016-03-07 05:18:29 -0800
commit9c3fc4344a11f2b6d0a7906d45bc7a684d756839 (patch)
tree48cff7e56c43f210d03c88b4979dc5bbd6cf75a5 /tests/bugs/fuse
parent6860968c3adaf2e8c3cb51124bbdfccef74beeb9 (diff)
ganesha: coverity fix in glusterd-ganesha.c
CID 1351698 Allocating buffer of size stat.st_size) to read lines from the file without an overrrun feels like a bit of a hack. While it's extremely unlikely that the file would ever be more than a thousand bytes long, a) we don't want to use bad patterns (and set bad examples or precedents for elsewhere in the source), and b) what if somehow the file did become "large." We just don't want to ever risk allocating huge amounts of memory by accident. And all the superfluous logic to copy the resulting string? We have gf_strdup() for that. And a clean coverity. See following gerrit review comments for the URL. Change-Id: I5860d6995d0eed06667fd2369df6be53ccff6ceb Signed-off-by: Kaleb S KEITHLEY <> Reviewed-on: Smoke: Gluster Build System <> NetBSD-regression: NetBSD Build System <> CentOS-regression: Gluster Build System <> Reviewed-by: Jeff Darcy <>
Diffstat (limited to 'tests/bugs/fuse')
0 files changed, 0 insertions, 0 deletions