dst->data = 0;
SECU_FileToItem(SECItem *dst, PRFileDesc *src){    PRFileInfo info;    PRInt32 numBytes;    PRStatus prStatus;    unsigned char *buf;    if (src == PR_STDIN)	return secu_StdinToItem(dst);    prStatus = PR_GetOpenFileInfo(src, &info);    if (prStatus != PR_SUCCESS) {	PORT_SetError(SEC_ERROR_IO);	return SECFailure;    }    buf = (unsigned char*)PORT_Alloc(info.size);    if (!buf)	return SECFailure;    numBytes = PR_Read(src, buf, info.size);    if (numBytes != info.size) {	PORT_SetError(SEC_ERROR_IO);	goto loser;    }    while (buf[numBytes-1] == '\r' ||            buf[numBytes-1] == '\n' ||           buf[numBytes-1] == '\0') numBytes--;    if (!SECITEM_AllocItem(NULL, dst, numBytes))	goto loser;    memcpy(dst->data, buf, numBytes);    PORT_Free(buf);    return SECSuccess;loser:    PORT_Free(buf);    return SECFailure;}