From: Sven Eckelmann <sven@open-mesh.com>
To: b.a.t.m.a.n@lists.open-mesh.org
Cc: Sven Eckelmann <sven@open-mesh.com>
Subject: [B.A.T.M.A.N.] [PATCH 6/7] alfred: Fix crash when vis opened empty file
Date: Mon, 9 Sep 2013 17:46:06 +0200 [thread overview]
Message-ID: <1378741567-25152-6-git-send-email-sven@open-mesh.com> (raw)
In-Reply-To: <1378741567-25152-1-git-send-email-sven@open-mesh.com>
Signed-off-by: Sven Eckelmann <sven@open-mesh.com>
---
vis/vis.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/vis/vis.c b/vis/vis.c
index 5e7a109..36ea7fe 100644
--- a/vis/vis.c
+++ b/vis/vis.c
@@ -59,7 +59,8 @@ static char *read_file(char *fname)
}
fclose(fp);
- buf[size] = 0;
+ if (buf)
+ buf[size] = 0;
return buf;
}
--
1.8.4.rc3
next prev parent reply other threads:[~2013-09-09 15:46 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-09 15:46 [B.A.T.M.A.N.] [PATCH 1/7] alfred: Add missing includes and remove unused includes Sven Eckelmann
2013-09-09 15:46 ` [B.A.T.M.A.N.] [PATCH 2/7] alfred: Mark all local functions as static Sven Eckelmann
2013-09-09 17:21 ` Simon Wunderlich
2013-09-09 15:46 ` [B.A.T.M.A.N.] [PATCH 3/7] alfred: Fix warning about assigning const to non-const Sven Eckelmann
2013-09-09 17:21 ` Simon Wunderlich
2013-09-09 15:46 ` [B.A.T.M.A.N.] [PATCH 4/7] alfred: Stop client when data header could not be read Sven Eckelmann
2013-09-09 17:22 ` Simon Wunderlich
2013-09-09 15:46 ` [B.A.T.M.A.N.] [PATCH 5/7] alfred: Remove dead assignment in unix_sock_read Sven Eckelmann
2013-09-09 17:22 ` Simon Wunderlich
2013-09-09 15:46 ` Sven Eckelmann [this message]
2013-09-09 17:22 ` [B.A.T.M.A.N.] [PATCH 6/7] alfred: Fix crash when vis opened empty file Simon Wunderlich
2013-09-09 15:46 ` [B.A.T.M.A.N.] [PATCH 7/7] alfred: Allow to switch daemon between slave and master Sven Eckelmann
2013-09-09 17:23 ` Simon Wunderlich
2013-09-09 17:20 ` [B.A.T.M.A.N.] [PATCH 1/7] alfred: Add missing includes and remove unused includes 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=1378741567-25152-6-git-send-email-sven@open-mesh.com \
--to=sven@open-mesh.com \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
/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