Fixes from overnight build failures
ssl.c: Certificate store fields freed without being NULLed and then freed again. integer.c: Compiler complained that a->dp may be NULL in mp_set_bit when setting bit. pkcs12.c: ret is zero after GetLength and this is an error but data is freed only when ret != 0. pkcs7.c: derArr was not zeroized for full allocated size.
This commit is contained in:
@@ -2831,7 +2831,7 @@ int mp_set_bit (mp_int * a, int b)
|
||||
{
|
||||
int i = b / DIGIT_BIT, res;
|
||||
|
||||
if (a->used < (int)(i + 1)) {
|
||||
if (a->dp == NULL || a->used < (int)(i + 1)) {
|
||||
/* grow a to accommodate the single bit */
|
||||
if ((res = mp_grow (a, i + 1)) != MP_OKAY) {
|
||||
return res;
|
||||
|
||||
Reference in New Issue
Block a user