Marin Ramesa, le Sat 14 Dec 2013 17:58:54 +0100, a écrit :
> + if (strlen(data) != sizeof(struct vm_map_copy))
> + return KERN_INVALID_ARGUMENT;
Err, no, this does not make sense: if data is to be casted into
vm_map_copy, it's not a string, it's some structure with pointers etc
This is a better version of this patch:
http://lists.gnu.org/archive/html/bug-hurd/2013-12/msg00400.html
It uses strlen(), instead of reimplementing it.
* device/chario.c: Include string.h.
(char_write): New if statement.
---
device/chario.c | 5 +
1 file changed, 5 insertions(+)
diff --g