Re: [PATCH] device/chario.c (char_write): avoid segmentation fault

2013-12-15 Thread Samuel Thibault
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

[PATCH] device/chario.c (char_write): avoid segmentation fault

2013-12-14 Thread Marin Ramesa
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