Subject: bug#47718: Fix epa-file-insert-file-contents substring error

From: Eli Zaretskii <[email-masked]>
Date: Mon, 12 Apr 2021 14:57:51 +0300

> From: Lars Ingebrigtsen <[email-masked]>
> Date: Mon, 12 Apr 2021 10:14:34 +0200
> Cc: [email-masked]
> 
> juntaka <[email-masked]> writes:
> 
> > I think substring occurs error when TO is longer than its content.
> > This patch will fix the substring bug in epa-file-insert-file-contents.
> 
> Thanks; applied to Emacs 28.

Actually, I wonder whether this is TRT: why should we silently accept
invalid inputs when substring itself doesn't?

IOW, can we please have a real-life use case where this happens, and
where silently "fixing" this input is TRT?  TIA.