diff options
| author | jsg <> | 2017-05-11 02:26:39 +0000 |
|---|---|---|
| committer | jsg <> | 2017-05-11 02:26:39 +0000 |
| commit | c89e8811cb675ecff7033a897289e9ec8be10fbd (patch) | |
| tree | 57e3f6c5fc4092cb1e77a8d62903a58378f79c7c /src | |
| parent | 02508bcceb2bbb57d18240c63d526e1ce34f43f5 (diff) | |
| download | openbsd-c89e8811cb675ecff7033a897289e9ec8be10fbd.tar.gz openbsd-c89e8811cb675ecff7033a897289e9ec8be10fbd.tar.bz2 openbsd-c89e8811cb675ecff7033a897289e9ec8be10fbd.zip | |
Fix a problem introduced in freezero() conversion and use
sizeof(struct) not sizeof(pointer).
otto@ points out that on OpenBSD currently freezero() would have still
zeroed the entire allocation, but this is not documented behaviour and
may change in future.
ok tom@
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/evp/e_chacha20poly1305.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libcrypto/evp/e_chacha20poly1305.c b/src/lib/libcrypto/evp/e_chacha20poly1305.c index 051d5548b5..b709c24270 100644 --- a/src/lib/libcrypto/evp/e_chacha20poly1305.c +++ b/src/lib/libcrypto/evp/e_chacha20poly1305.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: e_chacha20poly1305.c,v 1.16 2017/05/02 03:59:44 deraadt Exp $ */ | 1 | /* $OpenBSD: e_chacha20poly1305.c,v 1.17 2017/05/11 02:26:39 jsg Exp $ */ |
| 2 | 2 | ||
| 3 | /* | 3 | /* |
| 4 | * Copyright (c) 2015 Reyk Floter <reyk@openbsd.org> | 4 | * Copyright (c) 2015 Reyk Floter <reyk@openbsd.org> |
| @@ -83,7 +83,7 @@ aead_chacha20_poly1305_cleanup(EVP_AEAD_CTX *ctx) | |||
| 83 | { | 83 | { |
| 84 | struct aead_chacha20_poly1305_ctx *c20_ctx = ctx->aead_state; | 84 | struct aead_chacha20_poly1305_ctx *c20_ctx = ctx->aead_state; |
| 85 | 85 | ||
| 86 | freezero(c20_ctx, sizeof(c20_ctx)); | 86 | freezero(c20_ctx, sizeof(*c20_ctx)); |
| 87 | } | 87 | } |
| 88 | 88 | ||
| 89 | static void | 89 | static void |
