projects
/
qemu-gpiodev
/
libfuse.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b1a743c
)
fuse_lib_ioctl(): don't call memcpy with NULL argument
author
Nikolaus Rath
<Nikolaus@rath.org>
Mon, 25 Sep 2017 09:34:07 +0000
(10:34 +0100)
committer
Nikolaus Rath
<Nikolaus@rath.org>
Mon, 25 Sep 2017 09:34:07 +0000
(10:34 +0100)
This was detected by using clang's undefined behavior sanitizer, but
didn't seem to cause problems in practice.
lib/fuse.c
patch
|
blob
|
history
diff --git
a/lib/fuse.c
b/lib/fuse.c
index 5cc4e42aefe1bf5344bce47e0eb462aef8181919..7b0b979520eca445d95e55847eb6269ffd3ad5ec 100644
(file)
--- a/
lib/fuse.c
+++ b/
lib/fuse.c
@@
-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);