Fix possible calloc of 0

This commit is contained in:
Devin Torres 2013-09-23 18:27:03 -05:00
parent 6b6b34348f
commit 7c69ce64e3

View file

@ -2269,6 +2269,9 @@ parse_table_header(
if (header_end && data[header_end - 1] == '|')
pipes--;
if (pipes < 0)
return 0;
*columns = pipes + 1;
*column_data = calloc(*columns, sizeof(int));