entry->emailAddr = (char *)PORT_Alloc(PORT_Strlen(emailAddr)+1);
entry->emailAddr = (char *)PORT_ArenaAlloc(entry->common.arena, PORT_Strlen(emailAddr)+1);
DecodeDBSMimeEntry(certDBEntrySMime *entry, SECItem *dbentry, char *emailAddr){    /* is record long enough for header? */    if ( dbentry->len < DB_SMIME_ENTRY_HEADER_LEN ) {	PORT_SetError(SEC_ERROR_BAD_DATABASE);	goto loser;    }        /* is database entry correct length? */    entry->subjectName.len = ( ( dbentry->data[0] << 8 ) | dbentry->data[1] );    entry->smimeOptions.len = ( ( dbentry->data[2] << 8 ) | dbentry->data[3] );    entry->optionsDate.len = ( ( dbentry->data[4] << 8 ) | dbentry->data[5] );    if (( entry->subjectName.len + entry->smimeOptions.len +	 entry->optionsDate.len + DB_SMIME_ENTRY_HEADER_LEN ) != dbentry->len){	PORT_SetError(SEC_ERROR_BAD_DATABASE);	goto loser;    }        /* copy the subject name */    entry->subjectName.data =	(unsigned char *)PORT_ArenaAlloc(entry->common.arena,					 entry->subjectName.len);    if ( entry->subjectName.data == NULL ) {	PORT_SetError(SEC_ERROR_NO_MEMORY);	goto loser;    }    PORT_Memcpy(entry->subjectName.data,	      &dbentry->data[DB_SMIME_ENTRY_HEADER_LEN],	      entry->subjectName.len);    /* copy the smime options */    if ( entry->smimeOptions.len ) {	entry->smimeOptions.data =	    (unsigned char *)PORT_ArenaAlloc(entry->common.arena,					     entry->smimeOptions.len);	if ( entry->smimeOptions.data == NULL ) {	    PORT_SetError(SEC_ERROR_NO_MEMORY);	    goto loser;	}	PORT_Memcpy(entry->smimeOptions.data,		    &dbentry->data[DB_SMIME_ENTRY_HEADER_LEN +				   entry->subjectName.len],		    entry->smimeOptions.len);    }    if ( entry->optionsDate.len ) {	entry->optionsDate.data =	    (unsigned char *)PORT_ArenaAlloc(entry->common.arena,					     entry->optionsDate.len);	if ( entry->optionsDate.data == NULL ) {	    PORT_SetError(SEC_ERROR_NO_MEMORY);	    goto loser;	}	PORT_Memcpy(entry->optionsDate.data,		    &dbentry->data[DB_SMIME_ENTRY_HEADER_LEN +				   entry->subjectName.len +				   entry->smimeOptions.len],		    entry->optionsDate.len);    }    /* both options and options date must either exist or not exist */    if ( ( ( entry->optionsDate.len == 0 ) ||	  ( entry->smimeOptions.len == 0 ) ) &&	entry->smimeOptions.len != entry->optionsDate.len ) {	PORT_SetError(SEC_ERROR_BAD_DATABASE);	goto loser;    }    entry->emailAddr = (char *)PORT_Alloc(PORT_Strlen(emailAddr)+1);    if ( entry->emailAddr ) {	PORT_Strcpy(entry->emailAddr, emailAddr);    }        return(SECSuccess);loser:    return(SECFailure);}