diff options
Diffstat (limited to 'src/lib/modes/cipher_mode.cpp')
-rw-r--r-- | src/lib/modes/cipher_mode.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/modes/cipher_mode.cpp b/src/lib/modes/cipher_mode.cpp index df2944323..d622e7754 100644 --- a/src/lib/modes/cipher_mode.cpp +++ b/src/lib/modes/cipher_mode.cpp @@ -79,6 +79,12 @@ Cipher_Mode* get_cipher_mode(const std::string& algo, Cipher_Dir direction) #if defined(BOTAN_HAS_BLOCK_CIPHER) SCAN_Name spec(algo); + + if(spec.arg_count() == 0) + { + return nullptr; + } + std::unique_ptr<BlockCipher> bc(BlockCipher::create(spec.arg(0))); if(!bc) |