vmd: fix segfaults on corruped streams