sys/boot/zfs out of bounds warning
sbruno at ignoranthack.me
Mon Apr 28 17:40:05 UTC 2014
looking at sys/boot things this morning, noted that there's a pretty
obvious warning about an out of bounds access. I suspect that I don't
see a layer of abstraction here that makes this ok, but I'm not sure.
It seems like if this wasn't valid memory, things would go pretty badly
in zfs_lookup(). Is there a better way to do this memcpy() such that it
doesn't trip a warning here?
In file included from /home/sbruno/bsd/head/sys/boot/zfs/zfs.c:49:
/home/sbruno/bsd/head/sys/boot/zfs/zfsimpl.c:2080:19: warning: array
index 264 is past the end of the array (which contains 192 elements)
note: array 'dn_bonus' declared here
uint8_t dn_bonus[DN_MAX_BONUSLEN - sizeof (blkptr_t)];
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 473 bytes
Desc: This is a digitally signed message part
More information about the freebsd-fs