Browse Source

Fix d2i_X509_AUX.

The logic to reset *pp doesn't actually work if pp is NULL. (It also doesn't
work if *pp is NULL, but that didn't work before either.) Don't bother
resetting it. This is consistent with the template-based i2d functions which do
not appear to leave *pp alone on error.

Will send this upstream.

Change-Id: I9fb5753e5d36fc1d490535720b8aa6116de69a70
Reviewed-on: https://boringssl-review.googlesource.com/7812
Reviewed-by: Adam Langley <agl@google.com>
kris/onging/CECPQ3_patch15
David Benjamin 8 years ago
committed by Adam Langley
parent
commit
d18cb77864
1 changed files with 0 additions and 2 deletions
  1. +0
    -2
      crypto/x509/x_x509.c

+ 0
- 2
crypto/x509/x_x509.c View File

@@ -207,7 +207,6 @@ 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;
length = i2d_X509(a, pp);
if (length < 0 || a == NULL) {
return length;
@@ -215,7 +214,6 @@ int i2d_X509_AUX(X509 *a, unsigned char **pp)

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


Loading…
Cancel
Save