diff options
Diffstat (limited to 'sys/miscfs/fuse')
-rw-r--r-- | sys/miscfs/fuse/fuse_device.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/sys/miscfs/fuse/fuse_device.c b/sys/miscfs/fuse/fuse_device.c index 37598169b37..5bbde357c98 100644 --- a/sys/miscfs/fuse/fuse_device.c +++ b/sys/miscfs/fuse/fuse_device.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fuse_device.c,v 1.23 2017/08/10 14:36:34 mestre Exp $ */ +/* $OpenBSD: fuse_device.c,v 1.24 2018/01/22 13:16:48 helg Exp $ */ /* * Copyright (c) 2012-2013 Sylvestre Gallon <ccna.syl@gmail.com> * @@ -92,6 +92,15 @@ fuse_dump_buff(char *buff, int len) char text[17]; int i; + if (len < 0) { + printf("invalid len: %d", len); + return; + } + if (buff == NULL) { + printf("invalid buff"); + return; + } + bzero(text, 17); for (i = 0; i < len; i++) { if (i != 0 && (i % 16) == 0) { @@ -338,7 +347,7 @@ fuseioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p) } #ifdef FUSE_DEBUG - fuse_dump_buff(ioexch->fbxch_data, ioexch->fbxch_len); + fuse_dump_buff(fbuf->fb_dat, fbuf->fb_len); #endif /* Adding fbuf in fd_fbufs_wait */ |