This might increase safety.
char *buf;
/* @UNSAFE: but faster than t_strdup_printf() call.. */
- buf = t_malloc_no0(27);
+ buf = t_malloc0(27);
imap_to_date_tm(buf, tm);
buf[11] = ' ';
/* at least one encoded character */
str_append_n(dest, src, p-src);
- utf16 = t_malloc_no0(strlen(p)*2);
+ utf16 = t_malloc0(strlen(p)*2);
while (*p != '\0') {
if (*p == '&') {
str_append(dest, "&-");
ctx.view->map->hdr.record_size = sizeof(struct mail_index_record) + 16;
ctx.view->map->rec_map = t_new(struct mail_index_record_map, 1);
ctx.view->map->rec_map->records =
- t_malloc_no0(ctx.view->map->hdr.record_size);
+ t_malloc0(ctx.view->map->hdr.record_size);
t_array_init(&ctx.view->map->extensions, 4);
ext = array_append_space(&ctx.view->map->extensions);
ext->record_offset = sizeof(struct mail_index_record);
char *buf;
size_t err_size = 256;
- buf = t_malloc_no0(err_size);
- buf[err_size-1] = '\0';
+ buf = t_malloc0(err_size);
ERR_error_string_n(err, buf, err_size-1);
ret = buf;
if (len < 0)
name = "";
else {
- name = t_malloc_no0(len + 1);
+ name = t_malloc0(len + 1);
if (X509_NAME_get_text_by_NID(X509_get_subject_name(x509),
ssl_io->username_nid,
name, len + 1) < 0)
if (len < 0)
name = "";
else {
- name = t_malloc_no0(len + 1);
+ name = t_malloc0(len + 1);
if (X509_NAME_get_text_by_NID(X509_get_subject_name(x509),
ssl_username_nid, name, len + 1) < 0)
name = "";