The root folder results in mx.mbox being NULL, which causes a
segfault. This can be triggered by entering a subfolder and trying to
rename the ".." entry.
Due to the translation string freeze, no visible error message is
displayed. Add a TODO note about this for post-1.6 release.
goto fail;
}
+ /* TODO: add mutt_error call, such as
+ * "Cannot rename root folder"
+ */
+ if (!mx.mbox)
+ {
+ goto fail;
+ }
+
snprintf(buf, sizeof (buf), _("Rename mailbox %s to: "), mx.mbox);
- strfcpy (newname, NONULL (mx.mbox), sizeof (newname));
+ strfcpy (newname, mx.mbox, sizeof (newname));
if (mutt_get_field (buf, newname, sizeof (newname), M_FILE) < 0)
goto fail;