Fix possible calloc of 0
This commit is contained in:
parent
6b6b34348f
commit
7c69ce64e3
1 changed files with 3 additions and 0 deletions
|
@ -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));
|
||||
|
||||
|
|
Loading…
Reference in a new issue