Fix memory corruption in opensubtitles code