Bugzilla bug 318962: it is legal for PORT_Realloc(oldptr, 0) to return

NULL, so that shouldn't be treated as a memory allocation failure.
This commit is contained in:
wtchang%redhat.com 2005-12-22 01:39:17 +00:00
Родитель 905063bb31
Коммит 7af58c4ead
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -484,7 +484,7 @@ tdea_mct_next_keys(unsigned char *key,
key[k] ^= text_2[k-16];
}
}
/* set the parity bits */
/* set the parity bits */
for (k=0; k<24; k++) {
key[k] = odd_parity(key[k]);
}
@ -2325,7 +2325,7 @@ void sha_test(char *reqfn)
fputs(buf, resp);
msg = PORT_Realloc(msg, msgLen);
memset(msg, 0, msgLen);
if (msg == NULL) {
if (msg == NULL && msgLen != 0) {
goto loser;
}
continue;