Change cert_GetCertificateEmailAddresses to return NULL rather than
a pointer to an empty string when a cert has no email addresses. Partial fix for bug 211540. Modified certdb/alg1485.c git-svn-id: svn://10.0.0.236/trunk@144625 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1029,11 +1029,13 @@ cert_GetCertificateEmailAddresses(CERTCertificate *cert)
|
||||
}
|
||||
/* now copy superstring to cert's arena */
|
||||
finalLen = (pBuf - addrBuf) + 1;
|
||||
pBuf = PORT_ArenaAlloc(cert->arena, finalLen);
|
||||
if (pBuf) {
|
||||
PORT_Memcpy(pBuf, addrBuf, finalLen);
|
||||
pBuf = NULL;
|
||||
if (finalLen > 1) {
|
||||
pBuf = PORT_ArenaAlloc(cert->arena, finalLen);
|
||||
if (pBuf) {
|
||||
PORT_Memcpy(pBuf, addrBuf, finalLen);
|
||||
}
|
||||
}
|
||||
|
||||
loser:
|
||||
if (tmpArena)
|
||||
PORT_FreeArena(tmpArena, PR_FALSE);
|
||||
|
||||
Reference in New Issue
Block a user