[PATCH 14/65] initialize some variables

From: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
Date: Wed, 16 Apr 2014 19:46:26 +0200

Signed-off-by: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
---
 ii.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/ii.c b/ii.c
index 1e22dc2..ef145a2 100644
--- a/ii.c
+++ b/ii.c
_AT_@ -211,7 +211,8 @@ tokenize(char **result, size_t reslen, char *str, char delim) {
 
 static void
 print_out(char *channel, char *buf) {
-	char outfile[_POSIX_PATH_MAX], server[IRC_CHANNEL_MAX + 6], buft[18];
+	char outfile[_POSIX_PATH_MAX] = "", server[IRC_CHANNEL_MAX + 6] = "";
+	char buft[18] = "";
 	FILE *out = NULL;
 	time_t t = time(NULL);
 
_AT_@ -240,9 +241,9 @@ proc_channels_privmsg(int fd, char *channel, char *buf) {
 
 static void
 proc_channels_input(int fd, Channel *c, char *buf) {
-	char infile[_POSIX_PATH_MAX];
+	char infile[_POSIX_PATH_MAX] = "";
 	char *p = NULL;
-	size_t buflen;
+	size_t buflen = 0;
 
 	if(buf[0] != '/' && buf[0] != 0) {
 		proc_channels_privmsg(fd, c->name, buf);
-- 
2.4.10
--Multipart=_Mon__9_May_2016_17_21_10_+0200_I.6cpFVydhq75aaE
Content-Type: text/x-diff;
 name="0015-fix-possible-out-of-bounds-with-empty-string.patch"
Content-Disposition: attachment;
 filename="0015-fix-possible-out-of-bounds-with-empty-string.patch"
Content-Transfer-Encoding: 7bit
Received on Mon Sep 17 2001 - 00:00:00 CEST

This archive was generated by hypermail 2.3.0 : Mon May 09 2016 - 17:24:22 CEST