comparison cli-tcpfwd.c @ 184:ca55377e4f7e

- allocate correct buffer size for channel info, rather than sizeof(pointer).
author Matt Johnston <matt@ucc.asn.au>
date Sun, 24 Apr 2005 10:30:33 +0000
parents 0cfba3034be5
children 84925eceeb13
comparison
equal deleted inserted replaced
183:5162f4e4021c 184:ca55377e4f7e
92 int ret; 92 int ret;
93 93
94 TRACE(("enter cli_localtcp: %d %s %d", listenport, remoteaddr, 94 TRACE(("enter cli_localtcp: %d %s %d", listenport, remoteaddr,
95 remoteport)); 95 remoteport));
96 96
97 tcpinfo = (struct TCPListener*)m_malloc(sizeof(struct TCPListener*)); 97 tcpinfo = (struct TCPListener*)m_malloc(sizeof(struct TCPListener));
98 tcpinfo->sendaddr = m_strdup(remoteaddr); 98 tcpinfo->sendaddr = m_strdup(remoteaddr);
99 tcpinfo->sendport = remoteport; 99 tcpinfo->sendport = remoteport;
100 tcpinfo->listenport = listenport; 100 tcpinfo->listenport = listenport;
101 tcpinfo->chantype = &cli_chan_tcplocal; 101 tcpinfo->chantype = &cli_chan_tcplocal;
102 102