Fix a use-without init buf in recv.c.
authorAndre Noll <maan@systemlinux.org>
Sat, 15 Nov 2008 22:35:36 +0000 (23:35 +0100)
committerAndre Noll <maan@systemlinux.org>
Sat, 15 Nov 2008 22:35:36 +0000 (23:35 +0100)
We need to init not only the receiver task but also the stdout task structure.

recv.c

diff --git a/recv.c b/recv.c
index 5bce847..7ef78a9 100644 (file)
--- a/recv.c
+++ b/recv.c
@@ -67,6 +67,7 @@ int main(int argc, char *argv[])
        s.default_timeout.tv_sec = 1;
        s.default_timeout.tv_usec = 0;
 
+       memset(&sot, 0, sizeof(struct stdout_task));
        memset(&rn, 0, sizeof(struct receiver_node));
        for (ret = 0; receivers[ret].name; ret++)
                receivers[ret].init(&receivers[ret]);