Ver código fonte

Check for malloc failure in r2i_certpol.

See upstream's 34b9acbd3f.

Change-Id: I88d5b3cfbbe87e883323a9e6e1bf85227ed9576e
Reviewed-on: https://boringssl-review.googlesource.com/7811
Reviewed-by: Steven Valdez <svaldez@google.com>
Reviewed-by: David Benjamin <davidben@google.com>
kris/onging/CECPQ3_patch15
David Benjamin 8 anos atrás
pai
commit
176dbf04b7
1 arquivos alterados com 5 adições e 0 exclusões
  1. +5
    -0
      crypto/x509v3/v3_cpols.c

+ 5
- 0
crypto/x509v3/v3_cpols.c Ver arquivo

@@ -190,6 +190,11 @@ static STACK_OF(POLICYINFO) *r2i_certpol(X509V3_EXT_METHOD *method,
goto err;
}
pol = POLICYINFO_new();
if (pol == NULL) {
OPENSSL_PUT_ERROR(X509V3, ERR_R_MALLOC_FAILURE);
ASN1_OBJECT_free(pobj);
goto err;
}
pol->policyid = pobj;
}
if (!sk_POLICYINFO_push(pols, pol)) {


Carregando…
Cancelar
Salvar