Fix an invalid memory access in libavoid.