Initialize SECItem values in ATOB_ routines to avoid PR_Assert for previously
allocated data buffers in the NSS versions of these routines. git-svn-id: svn://10.0.0.236/trunk@65397 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -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));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user