From: Art Cancro Date: Tue, 14 Apr 2009 14:31:00 +0000 (+0000) Subject: * Adjust the memory allocation for Base64-converted messages in serv_migrate.c .... X-Git-Tag: v7.86~1270 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=315dab33ca05815d4671e2cc6fb3cfbbfa91c3bc * Adjust the memory allocation for Base64-converted messages in serv_migrate.c ... I guess I shouldn't have overconfidently used the words 'well-tested formula' in the comment next to it. --- diff --git a/citadel/modules/migrate/serv_migrate.c b/citadel/modules/migrate/serv_migrate.c index 4d0a35bfb..4441a09b9 100644 --- a/citadel/modules/migrate/serv_migrate.c +++ b/citadel/modules/migrate/serv_migrate.c @@ -268,7 +268,7 @@ void migr_export_message(long msgnum) { CtdlFreeMessage(msg); int encoded_len = 0; - int encoded_alloc = smr.len * 139 / 100; /* well-tested formula for predicting encoded size */ + int encoded_alloc = smr.len * 14 / 10; /* well-tested formula for predicting encoded size */ char *encoded_msg = malloc(encoded_alloc); if (encoded_msg != NULL) {