diff options
author | Nikolaus Rath <Nikolaus@rath.org> | 2017-09-25 10:34:07 +0100 |
---|---|---|
committer | Nikolaus Rath <Nikolaus@rath.org> | 2017-09-25 10:34:07 +0100 |
commit | 77092d95811257229727364b32e903d8b0db3792 (patch) | |
tree | 6bc788cc3b76da02674863a7362edde3640f0705 /lib | |
parent | b1a743c8eb8a5d665beb5675b5ba4ae66ffe8243 (diff) |
fuse_lib_ioctl(): don't call memcpy with NULL argument
This was detected by using clang's undefined behavior sanitizer, but
didn't seem to cause problems in practice.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/fuse.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -4148,7 +4148,7 @@ static void fuse_lib_ioctl(fuse_req_t req, fuse_ino_t ino, int cmd, void *arg, } assert(!in_bufsz || !out_bufsz || in_bufsz == out_bufsz); - if (out_buf) + if (out_buf && in_bufsz) memcpy(out_buf, in_buf, in_bufsz); err = get_path_nullok(f, ino, &path); |