diff --git a/opendkim/opendkim.c b/opendkim/opendkim.c index 803f37b0..eaa1c086 100644 --- a/opendkim/opendkim.c +++ b/opendkim/opendkim.c @@ -12303,8 +12303,10 @@ mlfi_eoh(SMFICTX *ctx) if (domainok) { - strlcpy((char *) dfc->mctx_domain, p, - sizeof dfc->mctx_domain); + // We must not use strlcpy() here since + // src and dst overlap. + char* p2 = dfc->mctx_domain; + while( (*p2++ = *p++) ); break; } }