avcodec/mss1: check for overread and forward errors