Mercurial > hg > quicktun
changeset 12:e4b60d041491
Make sure that the session buffer is zero
author | Ivo Smits <Ivo@UCIS.nl> |
---|---|
date | Sun, 05 Dec 2010 23:12:04 +0100 |
parents | 5be1ecb80cc9 |
children | f7e0145d8e2a |
files | src/common.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/common.c Sat Dec 04 02:10:00 2010 +0000 +++ b/src/common.c Sun Dec 05 23:12:04 2010 +0100 @@ -116,7 +116,7 @@ session->remote_float = 1; //return errorexit("Missing REMOTE_ADDRESS"); } else { - session->remote_float = 0; + session->remote_float = getconf("REMOTE_FLOAT") ? 1 : 0; he = gethostbyname(envval); if (!he) return errorexit("remote address lookup failed"); else if (!he->h_addr_list[0]) return errorexit("no address to connect to"); @@ -182,6 +182,7 @@ if (ttfd == -1) return -1; char protocol_data[p->protocol_data_size]; + memset(protocol_data, 0, p->protocol_data_size); session.protocol_data = &protocol_data; if (p->init) p->init(&session);