From a9da48157c90b4b6d19d912666ad2183b5a16a1f Mon Sep 17 00:00:00 2001 From: Rob Percival Date: Tue, 7 Jun 2016 17:01:44 +0100 Subject: [PATCH] Fix potential access of null pointer (pp) Reviewed-by: Matt Caswell Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/1186) --- crypto/ct/ct_oct.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crypto/ct/ct_oct.c b/crypto/ct/ct_oct.c index ced585f6ba..cacc3bd2b4 100644 --- a/crypto/ct/ct_oct.c +++ b/crypto/ct/ct_oct.c @@ -365,9 +365,9 @@ int i2o_SCT_LIST(const STACK_OF(SCT) *a, unsigned char **pp) if (pp != NULL) { p = *pp; s2n(len2 - 2, p); + if (!is_pp_new) + *pp += len2; } - if (!is_pp_new) - *pp += len2; return len2; err: -- 2.25.1