#include "mutt_crypt.h"
#include "mutt_idna.h"
-#include "lib/mem.h"
#include "lib/str.h"
#include "lib/debug.h"
if (!headers[x])
headers[x] = this_one;
else {
- mem_realloc (&headers[x], str_len (headers[x]) +
- str_len (this_one) + sizeof (char));
- strcat (headers[x], this_one); /* __STRCAT_CHECKED__ */
+ p_realloc(&headers[x], str_len(headers[x]) + str_len(this_one) + 1);
+ strcat(headers[x], this_one); /* __STRCAT_CHECKED__ */
p_delete(&this_one);
}
* abbreviations (curline is 0), $max_display_recips is 0 and
* while the number hasn't reached $max_display_recips yet */
else if (curline == 0 || MaxDispRecips == 0 || ++curline <= MaxDispRecips) {
- mem_realloc (&this_one,
- str_len (this_one) + str_len (buf) +
- sizeof (char));
+ p_realloc(&this_one, str_len(this_one) + str_len(buf) + 1);
strcat (this_one, buf); /* __STRCAT_CHECKED__ */
/* only for the first line which doesn't exeeds
* $max_display_recips: abbreviate it */
} else if (curline == MaxDispRecips+1) {
- mem_realloc (&this_one, str_len (this_one) + 5);
+ p_realloc(&this_one, str_len(this_one) + 5);
strcat (this_one, " ...");
}
}
if (!headers[x])
headers[x] = this_one;
else {
- mem_realloc (&headers[x], str_len (headers[x]) +
- str_len (this_one) + sizeof (char));
+ p_realloc(&headers[x], str_len(headers[x]) + str_len(this_one) + 1);
strcat (headers[x], this_one); /* __STRCAT_CHECKED__ */
p_delete(&this_one);
}
buflen = linelen + 3;
- mem_realloc (h, buflen);
+ p_realloc(h, buflen);
for (count = 0; a; a = a->next, count++) {
ADDRESS *tmp = a->next;
}
buflen += l + str_len (cbuf) + str_len (c2buf);
- mem_realloc (h, buflen);
+ p_realloc(h, buflen);
strcat (*h, cbuf); /* __STRCAT_CHECKED__ */
strcat (*h, buf); /* __STRCAT_CHECKED__ */
strcat (*h, c2buf); /* __STRCAT_CHECKED__ */