VUL: fix some possible buffer overruns