diff options
author | Rob Percival <robpercival@google.com> | 2016-02-24 15:11:36 +0000 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2016-02-26 14:57:29 -0500 |
commit | 2882e96a5f22ebd0af5dfaf8617f7cff5a409512 (patch) | |
tree | 53957e172b11f810b502f945c57da3dd7386b0f1 /crypto/ct/ct_oct.c | |
parent | 0cea8832df37d8fd3e664caec8abbdaa002122b1 (diff) | |
download | openssl-2882e96a5f22ebd0af5dfaf8617f7cff5a409512.tar.gz |
Fix for potential deferencing of null pointer in o2i_SCT_signature
Reviewed-by: Ben Laurie <ben@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'crypto/ct/ct_oct.c')
-rw-r--r-- | crypto/ct/ct_oct.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/ct/ct_oct.c b/crypto/ct/ct_oct.c index 6b6a6a7bc7..73fc61df2b 100644 --- a/crypto/ct/ct_oct.c +++ b/crypto/ct/ct_oct.c @@ -98,7 +98,7 @@ int o2i_SCT_signature(SCT *sct, const unsigned char **in, size_t len) { size_t siglen; size_t len_remaining = len; - const unsigned char *p = *in; + const unsigned char *p; if (sct->version != SCT_VERSION_V1) { CTerr(CT_F_O2I_SCT_SIGNATURE, CT_R_UNSUPPORTED_VERSION); @@ -116,6 +116,7 @@ int o2i_SCT_signature(SCT *sct, const unsigned char **in, size_t len) return -1; } + p = *in; /* Get hash and signature algorithm */ sct->hash_alg = *p++; sct->sig_alg = *p++; |