reset imprint to NULL to avoid double free. from mancha1 at zoho
authortedu <tedu@openbsd.org>
Sun, 20 Apr 2014 04:45:09 +0000 (04:45 +0000)
committertedu <tedu@openbsd.org>
Sun, 20 Apr 2014 04:45:09 +0000 (04:45 +0000)
lib/libcrypto/ts/ts_rsp_verify.c
lib/libssl/src/crypto/ts/ts_rsp_verify.c

index d51500b..7484b10 100644 (file)
@@ -626,6 +626,7 @@ static int TS_compute_imprint(BIO *data, TS_TST_INFO *tst_info,
  err:
        X509_ALGOR_free(*md_alg);
        free(*imprint);
+       *imprint = NULL;
        *imprint_len = 0;
        return 0;
        }
index d51500b..7484b10 100644 (file)
@@ -626,6 +626,7 @@ static int TS_compute_imprint(BIO *data, TS_TST_INFO *tst_info,
  err:
        X509_ALGOR_free(*md_alg);
        free(*imprint);
+       *imprint = NULL;
        *imprint_len = 0;
        return 0;
        }