From cb926cf0c9f28d65e60703d470dd835f240ef96d Mon Sep 17 00:00:00 2001 From: Erik Ekman Date: Sat, 15 Aug 2009 19:28:48 +0000 Subject: [PATCH] Fix some uninitialized variable warnings --- src/iodine.c | 2 ++ src/iodined.c | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/iodine.c b/src/iodine.c index 81a757c..4dcbe14 100644 --- a/src/iodine.c +++ b/src/iodine.c @@ -1215,6 +1215,8 @@ main(int argc, char **argv) int raw_mode; memset(password, 0, 33); + nameserv_addr = NULL; + pw = NULL; username = NULL; foreground = 0; newroot = NULL; diff --git a/src/iodined.c b/src/iodined.c index f29b0d9..1d10f68 100644 --- a/src/iodined.c +++ b/src/iodined.c @@ -330,7 +330,6 @@ handle_null_request(int tun_fd, int dns_fd, struct query *q, int domain_len) char unpacked[64*1024]; char *tmp[2]; int userid; - int version; int code; int read; @@ -339,6 +338,8 @@ handle_null_request(int tun_fd, int dns_fd, struct query *q, int domain_len) memcpy(in, q->name, MIN(domain_len, sizeof(in))); if(in[0] == 'V' || in[0] == 'v') { + int version = 0; + read = unpack_data(unpacked, sizeof(unpacked), &(in[1]), domain_len - 1, b32); /* Version greeting, compare and send ack/nak */ if (read > 4) { @@ -1141,6 +1142,7 @@ main(int argc, char **argv) char *netsize; int retval; + pw = NULL; username = NULL; newroot = NULL; context = NULL;