瀏覽代碼

Sync with upstream on i2d_X509_AUX.

Upstream decided to reset *pp on error and to later fix up the other i2d
functions to behave similarly. See upstream's
c5e603ee18.

Change-Id: I01f82b578464060d0f2be5460fe4c1b969124c8e
Reviewed-on: https://boringssl-review.googlesource.com/7844
Reviewed-by: Adam Langley <agl@google.com>
kris/onging/CECPQ3_patch15
David Benjamin 8 年之前
committed by Adam Langley
父節點
當前提交
a43fd90c5d
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. +3
    -0
      crypto/x509/x_x509.c

+ 3
- 0
crypto/x509/x_x509.c 查看文件

@@ -207,6 +207,7 @@ X509 *d2i_X509_AUX(X509 **a, const unsigned char **pp, long length)
int i2d_X509_AUX(X509 *a, unsigned char **pp)
{
int length, tmplen;
unsigned char *start = pp != NULL ? *pp : NULL;
length = i2d_X509(a, pp);
if (length < 0 || a == NULL) {
return length;
@@ -214,6 +215,8 @@ int i2d_X509_AUX(X509 *a, unsigned char **pp)

tmplen = i2d_X509_CERT_AUX(a->aux, pp);
if (tmplen < 0) {
if (start != NULL)
*pp = start;
return tmplen;
}
length += tmplen;


Loading…
取消
儲存