* [B.A.T.M.A.N.] [PATCH] [batctl] Fix array out of bound exception
@ 2009-12-11 21:06 Linus Lüssing
2009-12-14 22:24 ` Simon Wunderlich
0 siblings, 1 reply; 2+ messages in thread
From: Linus Lüssing @ 2009-12-11 21:06 UTC (permalink / raw)
To: b.a.t.m.a.n
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:
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [B.A.T.M.A.N.] [PATCH] [batctl] Fix array out of bound exception
2009-12-11 21:06 [B.A.T.M.A.N.] [PATCH] [batctl] Fix array out of bound exception Linus Lüssing
@ 2009-12-14 22:24 ` Simon Wunderlich
0 siblings, 0 replies; 2+ messages in thread
From: Simon Wunderlich @ 2009-12-14 22:24 UTC (permalink / raw)
To: The list for a Better Approach To Mobile Ad-hoc Networking
[-- Attachment #1: Type: text/plain, Size: 1018 bytes --]
Dear Linus,
thank you for your patch, i have applied it in svn r1496.
On Fri, Dec 11, 2009 at 10:06:23PM +0100, Linus Lüssing wrote:
> 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:
> _______________________________________________
> B.A.T.M.A.N mailing list
> B.A.T.M.A.N@lists.open-mesh.net
> https://lists.open-mesh.net/mm/listinfo/b.a.t.m.a.n
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-12-14 22:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-11 21:06 [B.A.T.M.A.N.] [PATCH] [batctl] Fix array out of bound exception Linus Lüssing
2009-12-14 22:24 ` Simon Wunderlich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox