зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
1a2f997a52
Коммит
ce66949116
|
@ -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));
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче