Why is this a vulnerability? malloc() should return 0 and the function will then register the allocation failure and give up.