+ char *encoded_att = malloc((one_att.length * 150) / 100);
+ if (encoded_att) {
+ size_t encoded_length = CtdlEncodeBase64(encoded_att, raw_att, one_att.length, BASE64_YES_LINEBREAKS);
+ ctdl_write(c, encoded_att, encoded_length);
+ syslog(LOG_DEBUG, "Encoded attachment: len=%ld", encoded_length);
+ free(encoded_att);
+ }
+ free(raw_att);