diff options
Diffstat (limited to 'src/libstrongswan/plugins/ntru/ntru_ke.c')
-rw-r--r-- | src/libstrongswan/plugins/ntru/ntru_ke.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libstrongswan/plugins/ntru/ntru_ke.c b/src/libstrongswan/plugins/ntru/ntru_ke.c index 88e6366f7..8e4e5e93f 100644 --- a/src/libstrongswan/plugins/ntru/ntru_ke.c +++ b/src/libstrongswan/plugins/ntru/ntru_ke.c @@ -193,6 +193,11 @@ METHOD(diffie_hellman_t, set_other_public_value, void, if (this->priv_key.len) { /* initiator decrypting shared secret */ + if (value.len == 0) + { + DBG1(DBG_LIB, "empty NTRU ciphertext"); + return; + } this->ciphertext = chunk_clone(value); DBG3(DBG_LIB, "NTRU ciphertext: %B", &this->ciphertext); |