diff options
-rw-r--r-- | src/lib/libcrypto/ecdh/ech_key.c | 4 | ||||
-rw-r--r-- | src/lib/libssl/src/crypto/ecdh/ech_key.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libcrypto/ecdh/ech_key.c b/src/lib/libcrypto/ecdh/ech_key.c index e695b0b9ad..33ee244499 100644 --- a/src/lib/libcrypto/ecdh/ech_key.c +++ b/src/lib/libcrypto/ecdh/ech_key.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ech_key.c,v 1.5 2015/09/13 14:11:57 jsing Exp $ */ | 1 | /* $OpenBSD: ech_key.c,v 1.6 2015/09/18 13:04:41 bcook Exp $ */ |
2 | /* ==================================================================== | 2 | /* ==================================================================== |
3 | * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. | 3 | * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. |
4 | * | 4 | * |
@@ -187,7 +187,7 @@ ecdh_compute_key(void *out, size_t outlen, const EC_POINT *pub_key, | |||
187 | } else { | 187 | } else { |
188 | /* No KDF, just copy out the key and zero the rest. */ | 188 | /* No KDF, just copy out the key and zero the rest. */ |
189 | if (outlen > buflen) { | 189 | if (outlen > buflen) { |
190 | memset(out + buflen, 0, outlen - buflen); | 190 | memset((void *)((uintptr_t)out + buflen), 0, outlen - buflen); |
191 | outlen = buflen; | 191 | outlen = buflen; |
192 | } | 192 | } |
193 | memcpy(out, buf, outlen); | 193 | memcpy(out, buf, outlen); |
diff --git a/src/lib/libssl/src/crypto/ecdh/ech_key.c b/src/lib/libssl/src/crypto/ecdh/ech_key.c index e695b0b9ad..33ee244499 100644 --- a/src/lib/libssl/src/crypto/ecdh/ech_key.c +++ b/src/lib/libssl/src/crypto/ecdh/ech_key.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ech_key.c,v 1.5 2015/09/13 14:11:57 jsing Exp $ */ | 1 | /* $OpenBSD: ech_key.c,v 1.6 2015/09/18 13:04:41 bcook Exp $ */ |
2 | /* ==================================================================== | 2 | /* ==================================================================== |
3 | * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. | 3 | * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. |
4 | * | 4 | * |
@@ -187,7 +187,7 @@ ecdh_compute_key(void *out, size_t outlen, const EC_POINT *pub_key, | |||
187 | } else { | 187 | } else { |
188 | /* No KDF, just copy out the key and zero the rest. */ | 188 | /* No KDF, just copy out the key and zero the rest. */ |
189 | if (outlen > buflen) { | 189 | if (outlen > buflen) { |
190 | memset(out + buflen, 0, outlen - buflen); | 190 | memset((void *)((uintptr_t)out + buflen), 0, outlen - buflen); |
191 | outlen = buflen; | 191 | outlen = buflen; |
192 | } | 192 | } |
193 | memcpy(out, buf, outlen); | 193 | memcpy(out, buf, outlen); |