The other problem is that a crafted packet will make the parser terminate early. The buffer is never initialized and is later passed to Strdup() http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-2225