Kaynağa Gözat

Add error handling in ASN1_i2d_bio.

(Imported from 950d49d43900e67a1f9d02bc1a053a9fdc5c4257.)

Change-Id: Ia41c5076019b8cb16a9af9247b947fba7b20e87a
Reviewed-on: https://boringssl-review.googlesource.com/22725
Reviewed-by: Steven Valdez <svaldez@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
kris/onging/CECPQ3_patch15
David Benjamin 7 yıl önce
committed by CQ bot account: commit-bot@chromium.org
ebeveyn
işleme
fa60369d6d
1 değiştirilmiş dosya ile 3 ekleme ve 0 silme
  1. +3
    -0
      crypto/asn1/a_i2d_fp.c

+ 3
- 0
crypto/asn1/a_i2d_fp.c Dosyayı Görüntüle

@@ -81,6 +81,9 @@ int ASN1_i2d_bio(i2d_of_void *i2d, BIO *out, void *x)
int i, j = 0, n, ret = 1;

n = i2d(x, NULL);
if (n <= 0)
return 0;

b = (char *)OPENSSL_malloc(n);
if (b == NULL) {
OPENSSL_PUT_ERROR(ASN1, ERR_R_MALLOC_FAILURE);


Yükleniyor…
İptal
Kaydet