Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Benjamin <davidben@google.com>2016-04-29 23:22:40 +0300
committerAdam Langley <agl@google.com>2016-04-29 23:26:52 +0300
commitd18cb77864dcc4b5c7cb08c2331008c01165f34f (patch)
tree6fd96ad018f241c680f2ced4fab67495879617a5 /crypto/x509
parent176dbf04b725b1ee53415fb84720935491c6b989 (diff)
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>
Diffstat (limited to 'crypto/x509')
-rw-r--r--crypto/x509/x_x509.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/crypto/x509/x_x509.c b/crypto/x509/x_x509.c
index 9d242348..f12140fb 100644
--- a/crypto/x509/x_x509.c
+++ b/crypto/x509/x_x509.c
@@ -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;