diff options
author | 2008-02-26 10:48:16 +0000 | |
---|---|---|
committer | 2008-02-26 10:48:16 +0000 | |
commit | 2e73df32e9d83c940faaf71fcaf4b01ed708ac41 (patch) | |
tree | 699e0e1c3d25a8b5a605e455f1770dbb58d0076f /lib/libssl/src | |
parent | Have popfile() also close the main config file, (diff) | |
download | wireguard-openbsd-2e73df32e9d83c940faaf71fcaf4b01ed708ac41.tar.xz wireguard-openbsd-2e73df32e9d83c940faaf71fcaf4b01ed708ac41.zip |
fix memory leak (in one case of unaligned buffers); from Markus Kvetter
ok markus
Diffstat (limited to 'lib/libssl/src')
-rw-r--r-- | lib/libssl/src/crypto/engine/hw_cryptodev.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libssl/src/crypto/engine/hw_cryptodev.c b/lib/libssl/src/crypto/engine/hw_cryptodev.c index d3b186c1324..a98f5d7e578 100644 --- a/lib/libssl/src/crypto/engine/hw_cryptodev.c +++ b/lib/libssl/src/crypto/engine/hw_cryptodev.c @@ -693,8 +693,9 @@ xcrypt_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, viac3_xcrypt_cbc(cw, usein, useout, ctx->cipher_data, inl / 16, ivp); - if (ISUNALIGNED(out)) { - bcopy(spare, out, inl); + if (ISUNALIGNED(in) || ISUNALIGNED(out)) { + if (ISUNALIGNED(out)) + bcopy(spare, out, inl); free(spare); } |