X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=innduct.git;a=blobdiff_plain;f=conn.c;h=36f554f1a6e422ca34e3de52540bea7157750dc4;hp=7ee6aabb11ed435c2cefdef1d335d465cd87d638;hb=e3812169fa785d9f7632bf8a82b4e9775fb7fbd6;hpb=e2d02662c513ccf5ed9391483cec014a12db087d diff --git a/conn.c b/conn.c index 7ee6aab..36f554f 100644 --- a/conn.c +++ b/conn.c @@ -376,7 +376,9 @@ void connect_start(void) { xclose(socks[0], "(in child) parent's connection fdpass socket",0); alarm(connection_setup_timeout); - if (NNTPconnect((char*)remote_host, port, &cn_from, &cn_to, buf) < 0) { + buf[sizeof(buf)-1] = 0; + if (NNTPconnect(remote_host, port, &cn_from, &cn_to, + buf, sizeof(buf)-1) < 0) { int l= strlen(buf); int stripped=0; while (l>0) {