diff options
author | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2021-08-23 11:11:29 +0200 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2021-08-25 17:24:27 +0200 |
commit | cf2b1d6f11aa7ec4aa909ff1ecb9bee6892285d9 (patch) | |
tree | d9228cce8f24f553f38eceab44013d34dec21b60 /apps | |
parent | 801abbe01ebd380a9b66f08d59fcc5e8738134a5 (diff) |
Avoid using undefined value in generate_stateless_cookie_callback
Reviewed-by: Paul Yang <kaishen.yy@antfin.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16381)
Diffstat (limited to 'apps')
-rw-r--r-- | apps/s_cb.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/s_cb.c b/apps/s_cb.c index dee1b2e5b4..d066a423de 100644 --- a/apps/s_cb.c +++ b/apps/s_cb.c @@ -819,7 +819,9 @@ int generate_stateless_cookie_callback(SSL *ssl, unsigned char *cookie, { unsigned int temp; int res = generate_cookie_callback(ssl, cookie, &temp); - *cookie_len = temp; + + if (res != 0) + *cookie_len = temp; return res; } |