[CVE-2018-17942] vasnprintf: Fix heap memory overrun bug.