Initialize SECItem values in ATOB_ routines to avoid PR_Assert for previously

allocated data buffers in the NSS versions of these routines.
This commit is contained in:
thayes%netscape.com 2000-04-06 00:26:24 +00:00
Родитель 1a2f997a52
Коммит ce66949116
1 изменённых файлов: 7 добавлений и 1 удалений

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

@ -34,7 +34,7 @@
/*
* Base64 decoding (ascii to binary).
*
* $Id: nssb64d.c,v 1.1 2000-03-31 19:38:17 relyea%netscape.com Exp $
* $Id: nssb64d.c,v 1.2 2000-04-06 00:26:24 thayes%netscape.com Exp $
*/
#include "nssb64.h"
@ -814,6 +814,9 @@ ATOB_AsciiToData(const char *string, unsigned int *lenp)
{
SECItem binary_item, *dummy;
binary_item.data = NULL;
binary_item.len = 0;
dummy = NSSBase64_DecodeBuffer (NULL, &binary_item, string,
(PRUint32) PORT_Strlen(string));
if (dummy == NULL)
@ -833,6 +836,9 @@ ATOB_ConvertAsciiToItem(SECItem *binary_item, char *ascii)
{
SECItem *dummy;
binary_item->data = NULL;
binary_item->len = 0;
dummy = NSSBase64_DecodeBuffer (NULL, binary_item, ascii,
(PRUint32) PORT_Strlen(ascii));