From 8ef310d71fed51f1bb25db5b539cb3416a459bac Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Fri, 5 Jul 2013 19:22:21 +0200 Subject: [PATCH] isl_tab.c: restore_basis: accept NULL pointer on zero-size allocation Signed-off-by: Sven Verdoolaege --- isl_tab.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/isl_tab.c b/isl_tab.c index f2107691..d2ebf25c 100644 --- a/isl_tab.c +++ b/isl_tab.c @@ -3166,7 +3166,7 @@ static int restore_basis(struct isl_tab *tab, int *col_var) unsigned off = 2 + tab->M; extra = isl_alloc_array(tab->mat->ctx, int, tab->n_col); - if (!extra) + if (tab->n_col && !extra) goto error; for (i = 0; i < tab->n_col; ++i) { for (j = 0; j < tab->n_col; ++j) -- 2.11.4.GIT