summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/emailer.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/emailer.cc b/src/lib/emailer.cc
index f5812f0c2..f906f5a8b 100644
--- a/src/lib/emailer.cc
+++ b/src/lib/emailer.cc
@@ -161,8 +161,14 @@ Emailer::send (string server, int port, EmailProtocol protocol, string user, str
"Content-Disposition: attachment; filename=" + i.name + "\r\n\r\n";
auto b64 = BIO_new (BIO_f_base64());
+ if (!b64) {
+ throw std::bad_alloc();
+ }
auto bio = BIO_new (BIO_s_mem());
+ if (!bio) {
+ throw std::bad_alloc();
+ }
bio = BIO_push (b64, bio);
ArrayData data (i.file);