realloc(pktin.data, biglen));
realloc(pktin.data, biglen)); #endif
static void ssh_gotdata(unsigned char *data, int datalen) {    static long len, biglen, to_read;    static unsigned char *p;    static int i, pad;    crBegin;    while (1) {	for (i = len = 0; i < 4; i++) {	    while (datalen == 0)		crReturnV;	    len = (len << 8) + *data;	    data++, datalen--;	}#ifdef FWHACK        if (len == 0x52656d6f) {       /* "Remo"te server has closed ... */            len = 0x300;               /* big enough to carry to end */        }#endif	pad = 8 - (len%8);	biglen = len + pad;	len -= 5;		       /* type and CRC */	pktin.length = len;	if (pktin.maxlen < biglen) {	    pktin.maxlen = biglen;	    pktin.data = (pktin.data == NULL ? malloc(biglen) :			realloc(pktin.data, biglen));	    if (!pktin.data)		fatalbox("Out of memory");	}	p = pktin.data, to_read = biglen;	while (to_read > 0) {	    static int chunk;	    chunk = to_read;	    while (datalen == 0)		crReturnV;	    if (chunk > datalen)		chunk = datalen;	    memcpy(p, data, chunk);	    data += chunk;	    datalen -= chunk;	    p += chunk;	    to_read -= chunk;	}	if (cipher)	    cipher->decrypt(pktin.data, biglen);	pktin.type = pktin.data[pad];	pktin.body = pktin.data+pad+1;	if (pktin.type == SSH_MSG_DEBUG) {	    /* FIXME: log it */	} else if (pktin.type == SSH_MSG_IGNORE) {	    /* do nothing */;	} else	    ssh_protocol(NULL, 0, 1);    }    crFinishV;}