diff options
author | Brent Cook <bcook@cvs.openbsd.org> | 2015-09-18 13:04:42 +0000 |
---|---|---|
committer | Brent Cook <bcook@cvs.openbsd.org> | 2015-09-18 13:04:42 +0000 |
commit | bab75d9376c21e99fd9fe814d0d0cdc58b5eff7a (patch) | |
tree | 620730e0c3a1a612ad02cf7797bdef6037a5512b /lib/libcrypto/ecdh | |
parent | 1cef547670aa6ee71bfa80664f9f32faf095d2e7 (diff) |
avoid void * pointer arithmetic
ok miod@
Diffstat (limited to 'lib/libcrypto/ecdh')
-rw-r--r-- | lib/libcrypto/ecdh/ech_key.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libcrypto/ecdh/ech_key.c b/lib/libcrypto/ecdh/ech_key.c index e695b0b9ade..33ee2444998 100644 --- a/lib/libcrypto/ecdh/ech_key.c +++ b/lib/libcrypto/ecdh/ech_key.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ech_key.c,v 1.5 2015/09/13 14:11:57 jsing Exp $ */ +/* $OpenBSD: ech_key.c,v 1.6 2015/09/18 13:04:41 bcook Exp $ */ /* ==================================================================== * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. * @@ -187,7 +187,7 @@ ecdh_compute_key(void *out, size_t outlen, const EC_POINT *pub_key, } else { /* No KDF, just copy out the key and zero the rest. */ if (outlen > buflen) { - memset(out + buflen, 0, outlen - buflen); + memset((void *)((uintptr_t)out + buflen), 0, outlen - buflen); outlen = buflen; } memcpy(out, buf, outlen); |