diff options
author | Pierre Ossman <ossman@cendio.se> | 2024-11-22 14:27:35 +0100 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2024-11-22 14:27:35 +0100 |
commit | 213c12c4f12101b560d532416788914b9f67399a (patch) | |
tree | 05a58c2098a027a663771fd9fcc23e4d8a63ef15 /common/rdr/AESOutStream.cxx | |
parent | 895b751c92775f7610869a205d58a0a7c98632e0 (diff) | |
download | tigervnc-213c12c4f12101b560d532416788914b9f67399a.tar.gz tigervnc-213c12c4f12101b560d532416788914b9f67399a.zip |
Change some assertions to exceptions
Diffstat (limited to 'common/rdr/AESOutStream.cxx')
-rw-r--r-- | common/rdr/AESOutStream.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/common/rdr/AESOutStream.cxx b/common/rdr/AESOutStream.cxx index fcb3e37a..1ec38b56 100644 --- a/common/rdr/AESOutStream.cxx +++ b/common/rdr/AESOutStream.cxx @@ -21,7 +21,9 @@ #endif #include <assert.h> -#include <rdr/Exception.h> + +#include <stdexcept> + #include <rdr/AESOutStream.h> #ifdef HAVE_NETTLE @@ -39,7 +41,7 @@ AESOutStream::AESOutStream(OutStream* _out, const uint8_t* key, else if (keySize == 256) EAX_SET_KEY(&eaxCtx256, aes256_set_encrypt_key, aes256_encrypt, key); else - assert(!"incorrect key size"); + throw std::out_of_range("Incorrect key size"); } AESOutStream::~AESOutStream() |