use the tor_malloc_zero wrapper

svn:r837
This commit is contained in:
Roger Dingledine
2003-11-18 08:20:19 +00:00
parent ec02f83f94
commit ac56486bf6
7 changed files with 13 additions and 21 deletions
+2 -1
View File
@@ -672,7 +672,8 @@ static int connection_ap_handshake_socks_reply(connection_t *conn, char *reply,
buf[1] = success ? SOCKS5_SUCCESS : SOCKS5_GENERIC_ERROR;
buf[2] = 0;
buf[3] = 1; /* ipv4 addr */
memset(buf+4,0,6); /* XXX set external addr/port to 0, see what breaks */
memset(buf+4,0,6); /* Set external addr/port to 0.
The spec doesn't seem to say what to do here. -RD */
connection_write_to_buf(buf,10,conn);
return flush_buf(conn->s, conn->outbuf, &conn->outbuf_flushlen); /* try to flush it */
}