summaryrefslogtreecommitdiff
path: root/src/lib/libssl/s23_srvr.c
diff options
context:
space:
mode:
authorjsing <>2014-12-10 15:43:31 +0000
committerjsing <>2014-12-10 15:43:31 +0000
commit47eb97a22f4397f7e4d7b37419d4c88e805cf71b (patch)
tree626ac5debee47cd4bf6f23ff35253234be5bbe4d /src/lib/libssl/s23_srvr.c
parent1434a91c4d4dc782915ce81dd056fa8f6cb77ae1 (diff)
downloadopenbsd-47eb97a22f4397f7e4d7b37419d4c88e805cf71b.tar.gz
openbsd-47eb97a22f4397f7e4d7b37419d4c88e805cf71b.tar.bz2
openbsd-47eb97a22f4397f7e4d7b37419d4c88e805cf71b.zip
ssl3_init_finished_mac() calls BIO_new() which can fail since it in turn
calls malloc(). Instead of silently continuing on failure, check the return value of BIO_new() and propagate failure back to the caller for appropriate handling. ok bcook@
Diffstat (limited to 'src/lib/libssl/s23_srvr.c')
-rw-r--r--src/lib/libssl/s23_srvr.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/libssl/s23_srvr.c b/src/lib/libssl/s23_srvr.c
index 9530ecdbaa..a7686c3f40 100644
--- a/src/lib/libssl/s23_srvr.c
+++ b/src/lib/libssl/s23_srvr.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: s23_srvr.c,v 1.36 2014/11/16 14:12:47 jsing Exp $ */ 1/* $OpenBSD: s23_srvr.c,v 1.37 2014/12/10 15:43:31 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -219,7 +219,10 @@ ssl23_accept(SSL *s)
219 s->init_buf = buf; 219 s->init_buf = buf;
220 } 220 }
221 221
222 ssl3_init_finished_mac(s); 222 if (!ssl3_init_finished_mac(s)) {
223 ret = -1;
224 goto end;
225 }
223 226
224 s->state = SSL23_ST_SR_CLNT_HELLO_A; 227 s->state = SSL23_ST_SR_CLNT_HELLO_A;
225 s->ctx->stats.sess_accept++; 228 s->ctx->stats.sess_accept++;