summaryrefslogtreecommitdiffstats
path: root/Utilities/cmlibarchive/libarchive/archive_cryptor.c
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-02-20 13:04:00 (GMT)
committerBrad King <brad.king@kitware.com>2017-02-20 13:04:00 (GMT)
commita59a7ee95601f3496ec9ba9ae1283a8d980460bf (patch)
treed8279b1fe0a6ab19eaaf6c1490040663708e192d /Utilities/cmlibarchive/libarchive/archive_cryptor.c
parentcdce7c619c58ec0947c036b93013445bb93e4be8 (diff)
parentc206211af647dd1f7039da91c34c9c72e50aefdf (diff)
downloadCMake-a59a7ee95601f3496ec9ba9ae1283a8d980460bf.zip
CMake-a59a7ee95601f3496ec9ba9ae1283a8d980460bf.tar.gz
CMake-a59a7ee95601f3496ec9ba9ae1283a8d980460bf.tar.bz2
Merge branch 'upstream-LibArchive' into update-libarchive
* upstream-LibArchive: LibArchive 2017-02-19 (100ee75a)
Diffstat (limited to 'Utilities/cmlibarchive/libarchive/archive_cryptor.c')
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_cryptor.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Utilities/cmlibarchive/libarchive/archive_cryptor.c b/Utilities/cmlibarchive/libarchive/archive_cryptor.c
index 2a51dfe..ced52fd 100644
--- a/Utilities/cmlibarchive/libarchive/archive_cryptor.c
+++ b/Utilities/cmlibarchive/libarchive/archive_cryptor.c
@@ -302,7 +302,8 @@ aes_ctr_release(archive_crypto_ctx *ctx)
static int
aes_ctr_init(archive_crypto_ctx *ctx, const uint8_t *key, size_t key_len)
{
- ctx->ctx = EVP_CIPHER_CTX_new();
+ if ((ctx->ctx = EVP_CIPHER_CTX_new()) == NULL)
+ return -1;
switch (key_len) {
case 16: ctx->type = EVP_aes_128_ecb(); break;