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 ---
Index: batctl/functions.c =================================================================== --- batctl/functions.c (revision 1491) +++ batctl/functions.c (working copy) @@ -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: