aboutsummaryrefslogtreecommitdiffstats
path: root/src/aead/aead.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/aead/aead.cpp')
-rw-r--r--src/aead/aead.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/aead/aead.cpp b/src/aead/aead.cpp
index 62d6d5f44..1ec7b4a4a 100644
--- a/src/aead/aead.cpp
+++ b/src/aead/aead.cpp
@@ -30,6 +30,9 @@ AEAD_Mode* get_aead(const std::string& algo_spec, Cipher_Dir direction)
if(algo_parts.empty())
throw Invalid_Algorithm_Name(algo_spec);
+ if(algo_parts.size() < 2)
+ return nullptr;
+
const std::string cipher_name = algo_parts[0];
const std::string mode_name = algo_parts[1];