"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);
auto const r = curl_easy_perform (curl);
if (r != CURLE_OK) {
- throw NetworkError (_("Failed to send email"), curl_easy_strerror(r));
+ throw NetworkError (_("Failed to send email"), string(curl_easy_strerror(r)));
}
curl_slist_free_all (recipients);