From f85b3ead63afd5fbcc9c85314e47942746e44fb3 Mon Sep 17 00:00:00 2001 From: Oliver Jowett Date: Sun, 4 Jan 2015 16:49:15 +0000 Subject: [PATCH] Initialize tsvVerbatim, or we risk writing garbage to FATSV connections. --- faup1090.c | 1 + net_io.c | 1 + ppup1090.c | 1 + view1090.c | 1 + 4 files changed, 4 insertions(+) diff --git a/faup1090.c b/faup1090.c index 16fe297..44fa5ab 100644 --- a/faup1090.c +++ b/faup1090.c @@ -416,6 +416,7 @@ int main(int argc, char **argv) { c->fd = c->service = Modes.bis = fd; + c->tsvVerbatim[0] = 0; Modes.clients = c; Modes.stat_beast_connections_in = 1; diff --git a/net_io.c b/net_io.c index 1374618..7c35958 100644 --- a/net_io.c +++ b/net_io.c @@ -125,6 +125,7 @@ struct client * modesAcceptClients(void) { c->next = Modes.clients; c->fd = fd; c->buflen = 0; + c->tsvVerbatim[0] = 0; Modes.clients = c; anetSetSendBuffer(Modes.aneterr,fd, (MODES_NET_SNDBUF_SIZE << Modes.net_sndbuf_size)); diff --git a/ppup1090.c b/ppup1090.c index 598dfed..2e2bc8c 100644 --- a/ppup1090.c +++ b/ppup1090.c @@ -236,6 +236,7 @@ int main(int argc, char **argv) { c->fd = c->service = Modes.bis = fd; + c->tsvVerbatim[0] = 0; Modes.clients = c; // Keep going till the user does something that stops us diff --git a/view1090.c b/view1090.c index 733c874..bbbc300 100644 --- a/view1090.c +++ b/view1090.c @@ -154,6 +154,7 @@ int setupConnection(struct client *c) { c->fd = c->service = Modes.bis = fd; + c->tsvVerbatim[0] = 0; Modes.clients = c; } return fd;