work for Firefox

This commit is contained in:
Jim Norman 2006-03-30 00:08:16 +00:00
parent b128dc7f28
commit 17e87363f8

View File

@ -544,7 +544,7 @@ static int32_t unescapeString(uint8_t *val, uint32_t *valueLen)
uint32_t rc = NSSCS_SUCCESS;
len = *valueLen;
temp = malloc(len);
temp = malloc(len+1);
if (temp)
{
for(k = i = 0; i < len; i++)
@ -574,7 +574,7 @@ static int32_t unescapeString(uint8_t *val, uint32_t *valueLen)
} // end for ...
temp[k] = '\0';
sscs_Utf8Strcpy(val, temp);
*valueLen = k;
*valueLen = k+1;
free(temp);
return rc;
}
@ -1794,6 +1794,11 @@ miCASAReadKey
{
return(NSSCS_E_INVALID_PARAM);
}
if (keyLen > NSSCS_MAX_SECRET_ID_LEN)
{
return(NSSCS_E_SECRET_ID_TOO_LONG);
}
secretID.len = NSSCS_MAX_SECRET_ID_LEN;