if (macro_read_assignment(big_buffer))
{
uschar * s = Ustrchr(big_buffer, '=');
- printf("Defined macro '%.*s'\n", s - big_buffer, big_buffer);
+ printf("Defined macro '%.*s'\n", (int)(s - big_buffer), big_buffer);
}
}
else
m->replen = Ustrlen(val);
m->m_number = m_number++;
memset(&m->tnode, 0, sizeof(tree_node));
-Ustrcpy(m->tnode.name, name);
+/* Use memcpy here not Ustrcpy to avoid spurious compiler-inserted check
+when building with fortify-source. We know there is room for the copy into
+this dummy for a variable-size array because of the way we did the memory
+allocation above. */
+memcpy(m->tnode.name, name, namelen+1);
m->tnode.data.ptr = string_copyn(val, m->replen);
(void) tree_insertnode(&tree_macros, &m->tnode);