public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
From: "Linus Lüssing" <linus.luessing@web.de>
To: b.a.t.m.a.n@lists.open-mesh.net
Subject: [B.A.T.M.A.N.] [PATCH] [batctl] Fix array out of bound exception
Date: Fri, 11 Dec 2009 22:06:23 +0100	[thread overview]
Message-ID: <20091211210623.GA3538@Linus-Debian> (raw)

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:

             reply	other threads:[~2009-12-11 21:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-11 21:06 Linus Lüssing [this message]
2009-12-14 22:24 ` [B.A.T.M.A.N.] [PATCH] [batctl] Fix array out of bound exception Simon Wunderlich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091211210623.GA3538@Linus-Debian \
    --to=linus.luessing@web.de \
    --cc=b.a.t.m.a.n@lists.open-mesh.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox