From 64b5b5bd7cfdef1f1204fa305e9d685de8bf5b7f Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Thu, 7 Dec 2017 14:35:30 +0000 Subject: [PATCH] Fix the buffer sizing in the fatalerrtest Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/4868) --- test/fatalerrtest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/fatalerrtest.c b/test/fatalerrtest.c index 4a5883976e..690d7e2d2b 100644 --- a/test/fatalerrtest.c +++ b/test/fatalerrtest.c @@ -69,7 +69,7 @@ static int test_fatalerr(void) } /* SSL_read()/SSL_write should fail because of a previous fatal error */ - if ((len = SSL_read(sssl, buf, sizeof(buf - 1))) > 0) { + if ((len = SSL_read(sssl, buf, sizeof(buf) - 1)) > 0) { buf[len] = '\0'; printf("Unexpected success reading data: %s\n", buf); goto err; -- 2.25.1