/**
* mutt_addr_to_local - Convert an Address from Punycode
* @param a Address to convert
- * @param bool True on success, false otherwise
+ * @retval bool True on success, false otherwise
*/
bool mutt_addr_to_local(struct Address *a)
{
struct Context *ctx = hfi->ctx;
struct Mailbox *m = hfi->mailbox;
+ if (!e || !e->env)
+ return src;
+
const struct Address *reply_to = TAILQ_FIRST(&e->env->reply_to);
const struct Address *from = TAILQ_FIRST(&e->env->from);
const struct Address *to = TAILQ_FIRST(&e->env->to);
const struct Address *cc = TAILQ_FIRST(&e->env->cc);
- if (!e || !e->env)
- return src;
buf[0] = '\0';
switch (op)
{
*/
void mutt_buffer_reset(struct Buffer *buf)
{
- if (!buf)
+ if (!buf || !buf->data || (buf->dsize == 0))
return;
memset(buf->data, 0, buf->dsize);
buf->dptr = buf->data;