diff options
author | lloyd <[email protected]> | 2008-11-07 00:47:58 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-11-07 00:47:58 +0000 |
commit | a436139205545cd4a7cd50b6e4bf092e7b320367 (patch) | |
tree | 2857dd06bf702359bfd1e17ae083ad7ec12a8385 /src/cms | |
parent | f67dfb9142dfef08ec102fbb6fd65745e8b19557 (diff) |
Add a check for empty string in CMS_Encoder::can_compress_with (mostly to avoid warning)
Diffstat (limited to 'src/cms')
-rw-r--r-- | src/cms/cms_comp.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cms/cms_comp.cpp b/src/cms/cms_comp.cpp index 60477e8ac..a0e777321 100644 --- a/src/cms/cms_comp.cpp +++ b/src/cms/cms_comp.cpp @@ -53,6 +53,9 @@ void CMS_Encoder::compress(const std::string& algo) *************************************************/ bool CMS_Encoder::can_compress_with(const std::string& algo) { + if(algo == "") + throw Invalid_Algorithm_Name("Empty string to can_compress_with"); + #if defined(BOTAN_HAS_COMPRESSOR_ZLIB) if(algo == "Zlib") return true; |