summaryrefslogtreecommitdiffstats
path: root/headers.c
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2021-07-13 14:22:38 -0700
committerKevin McCarthy <kevin@8t8.us>2021-07-17 15:11:54 -0700
commit6637beb9f45ae5d0cccf3ed7fbd25c07654980cc (patch)
tree808c47b28ea86d513c6a5b5047ba5d5b25d54bf2 /headers.c
parente2a89abc6f92b23f2f7828d7badcedce1d31f139 (diff)
Fix mutt_label_message to use strfcpy().
strncpy could leave an unterminated string.
Diffstat (limited to 'headers.c')
-rw-r--r--headers.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/headers.c b/headers.c
index 57ec839e..063525ea 100644
--- a/headers.c
+++ b/headers.c
@@ -318,7 +318,7 @@ int mutt_label_message(HEADER *hdr)
*buf = '\0';
if (hdr != NULL && hdr->env->x_label != NULL)
{
- strncpy(buf, hdr->env->x_label, LONG_STRING);
+ strfcpy(buf, hdr->env->x_label, LONG_STRING);
}
if (mutt_get_field("Label: ", buf, sizeof(buf), MUTT_LABEL /* | MUTT_CLEAR */) != 0)