summaryrefslogtreecommitdiffstats
path: root/test/fatalerrtest.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2017-12-07 14:35:30 +0000
committerMatt Caswell <matt@openssl.org>2017-12-07 14:37:33 +0000
commit64b5b5bd7cfdef1f1204fa305e9d685de8bf5b7f (patch)
tree94069ac5667f7192542382be5b3e6f3eeb7604f6 /test/fatalerrtest.c
parent4749aba5a24a646cc1e84b1e4d21e6f52399da33 (diff)
Fix the buffer sizing in the fatalerrtest
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4868)
Diffstat (limited to 'test/fatalerrtest.c')
-rw-r--r--test/fatalerrtest.c2
1 files changed, 1 insertions, 1 deletions
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;