avcodec/htmlsubtitles: Fix reading one byte beyond the array