From cbd593de08b1b87a0055fc89365a13ce97a1f2d2 Mon Sep 17 00:00:00 2001 From: Kyungwook Tak Date: Mon, 12 Sep 2016 10:30:53 +0900 Subject: [PATCH] Revert "Fix svace defects" This reverts commit 60428c2b10ccec13afe901d21b87ac949ffafa4c. 2 Svace defects (141053, 142079) is handled as `won't fix`, defended by assert() checking and logically Change-Id: I4d29b8e0c430929a57767293ec9c0d442e2f44e4 Signed-off-by: Kyungwook Tak --- src/encrypt.c | 3 +-- src/rsa.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/encrypt.c b/src/encrypt.c index d343efe..9bf4e74 100644 --- a/src/encrypt.c +++ b/src/encrypt.c @@ -556,8 +556,7 @@ static int encrypt_ctx_restore(struct yaca_encrypt_context_s *c) } key = key_get_simple(c->backup_ctx->sym_key); - if (key == NULL) - return YACA_ERROR_INVALID_PARAMETER; + assert(key != NULL); ret = encrypt_ctx_init(c, c->backup_ctx->cipher, key->bit_len); assert(ret != YACA_ERROR_INVALID_PARAMETER); diff --git a/src/rsa.c b/src/rsa.c index 334a383..436c3b9 100644 --- a/src/rsa.c +++ b/src/rsa.c @@ -78,8 +78,7 @@ static int encrypt_decrypt(yaca_padding_e padding, assert(lpadding != -1); lasym_key = key_get_evp(key); - if (lasym_key == NULL) - return YACA_ERROR_INVALID_PARAMETER; + assert(lasym_key != NULL); ret = EVP_PKEY_size(lasym_key->evp); if (ret <= 0) { -- 2.7.4