diff options
author | mestre <> | 2018-11-14 17:24:14 +0000 |
---|---|---|
committer | mestre <> | 2018-11-14 17:24:14 +0000 |
commit | df22426effa512ebec9011df9ac79e3c9faf2baa (patch) | |
tree | e145e0c43a927bce292534e4e65972e4c2c3ae2e | |
parent | fedc16ec539a5da2d75085990e706b549e1e2d20 (diff) | |
download | openbsd-df22426effa512ebec9011df9ac79e3c9faf2baa.tar.gz openbsd-df22426effa512ebec9011df9ac79e3c9faf2baa.tar.bz2 openbsd-df22426effa512ebec9011df9ac79e3c9faf2baa.zip |
Fix wrong sizeof argument by using 'uint16_t *', with minor nit from tb@,
instead of 'uint16_t'
Found with llvm's static analyzer, noticed that it was also already reported in
Coverity CID 155890 and to ensure this was correct also inspected OpenSSL's
equivalent code.
OK tb@ and jsing@
-rw-r--r-- | src/lib/libssl/ssl_lib.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libssl/ssl_lib.c b/src/lib/libssl/ssl_lib.c index 66e14b9816..b69b7cecfe 100644 --- a/src/lib/libssl/ssl_lib.c +++ b/src/lib/libssl/ssl_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl_lib.c,v 1.193 2018/11/11 06:58:14 tb Exp $ */ | 1 | /* $OpenBSD: ssl_lib.c,v 1.194 2018/11/14 17:24:14 mestre 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 | * |
@@ -312,7 +312,7 @@ SSL_new(SSL_CTX *ctx) | |||
312 | if (ctx->internal->tlsext_supportedgroups != NULL) { | 312 | if (ctx->internal->tlsext_supportedgroups != NULL) { |
313 | s->internal->tlsext_supportedgroups = | 313 | s->internal->tlsext_supportedgroups = |
314 | calloc(ctx->internal->tlsext_supportedgroups_length, | 314 | calloc(ctx->internal->tlsext_supportedgroups_length, |
315 | sizeof(ctx->internal->tlsext_supportedgroups)); | 315 | sizeof(ctx->internal->tlsext_supportedgroups[0])); |
316 | if (s->internal->tlsext_supportedgroups == NULL) | 316 | if (s->internal->tlsext_supportedgroups == NULL) |
317 | goto err; | 317 | goto err; |
318 | memcpy(s->internal->tlsext_supportedgroups, | 318 | memcpy(s->internal->tlsext_supportedgroups, |