i->data = (unsigned char*)PORT_Alloc(count); if (i->data == NULL) {  (void)SSL3_SendAlert(ss, alert_fatal, handshake_failure); PORT_SetError(SEC_ERROR_NO_MEMORY); return SECFailure;
if ((PRUint32)count > *length) { return ssl3_DecodeError(ss);
ssl3_ConsumeHandshakeVariable(sslSocket *ss, SECItem *i, PRInt32 bytes,			      SSL3Opaque **b, PRUint32 *length){    PRInt32   count;    SECStatus rv;    PORT_Assert(bytes <= 3);    i->len  = 0;    i->data = NULL;    count = ssl3_ConsumeHandshakeNumber(ss, bytes, b, length);    if (count < 0) { 		/* Can't test for SECSuccess here. */    	return SECFailure;    }    if (count > 0) {	i->data = (unsigned char*)PORT_Alloc(count);	if (i->data == NULL) {	    /* XXX inconsistent.  In other places, we don't send alerts for	     * our own memory failures.  But here we do... */	    (void)SSL3_SendAlert(ss, alert_fatal, handshake_failure);	    PORT_SetError(SEC_ERROR_NO_MEMORY);	    return SECFailure;	}	i->len = count;	rv = ssl3_ConsumeHandshake(ss, i->data, i->len, b, length);	if (rv != SECSuccess) {	    PORT_Free(i->data);	    i->data = NULL;	    return rv;	/* alert has already been sent. */	}    }    return SECSuccess;}