Author: simon Date: 2009-12-13 18:54:42 +0000 (Sun, 13 Dec 2009) New Revision: 1496
Modified: trunk/batctl/functions.c Log: batctl: Fix array out of bound exception
This patch fixes an array out of bound exception in line 201 of functions.c. We need to reserve one extra character for the appended null character.
Signed-off-by: Linus Lüssing linus.luessing@web.de Acked-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de
Modified: trunk/batctl/functions.c =================================================================== --- trunk/batctl/functions.c 2009-12-13 18:40:52 UTC (rev 1495) +++ trunk/batctl/functions.c 2009-12-13 18:54:42 UTC (rev 1496) @@ -161,10 +161,10 @@
if (read_opt & USE_READ_BUFF) { read_ptr = read_buff; - read_len = sizeof(read_buff); + read_len = sizeof(read_buff)-1; } else { read_ptr = lbuff; - read_len = sizeof(lbuff); + read_len = sizeof(lbuff)-1; }
open: