Escaping
Frames that end on a flag byte resynchronize by themselves, until the data contains the flag. At 125 and 126 meters the frames fall apart; byte stuffing with a 0x7D escape, as HDLC and PPP do it, puts them back together.
Open it in the simulator