Subject: bug#36431: Crash in marker.c:337

From: Eli Zaretskii <[email-masked]>
Date: Tue, 02 Jul 2019 20:39:44 +0300

> From: Stefan Monnier <[email-masked]>
> Cc: [email-masked],  [email-masked]
> Date: Tue, 02 Jul 2019 13:04:38 -0400
> 
> We start by inserting the new bytes at the *beginning* of the gap, but
> when we do the move_gap_both this moves those bytes to the *end* of the
> gap (where decode_coding_gap expects them, apparently), so when we
> decode we always have to move all the inserted bytes, right?

Yes.  This is so we don't need to know up front how many bytes will be
read from the file.