X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/6e3b198d9efa70de98409fbb78b9f83257b2101c..8d468c4c169a7519d5b172cc049b1d8cc7b1c343:/src/src/spool_mbox.c diff --git a/src/src/spool_mbox.c b/src/src/spool_mbox.c index 63542ebef..95e71b9c9 100644 --- a/src/src/spool_mbox.c +++ b/src/src/spool_mbox.c @@ -165,7 +165,8 @@ if (!spool_mbox_ok) (void)fclose(mbox_file); mbox_file = NULL; - Ustrncpy(spooled_message_id, message_id, MESSAGE_ID_LENGTH+1); + Ustrncpy(spooled_message_id, message_id, sizeof(spooled_message_id)); + spooled_message_id[sizeof(spooled_message_id)-1] = '\0'; spool_mbox_ok = 1; }