From 3be1d7fe121a0e51cfa55dfe5fae2c3b8ab9a66d Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Fri, 6 May 2016 09:49:34 +0200 Subject: [PATCH] isl_tab_lexmin_add_eq: make sure the tableau has enough room add_lexmin_ineq assumes that the caller has made sure that the tableau has enough room to store the new constraint. Reported-by: Tobias Grosser Signed-off-by: Sven Verdoolaege --- isl_tab_pip.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/isl_tab_pip.c b/isl_tab_pip.c index 93e310de..378660ac 100644 --- a/isl_tab_pip.c +++ b/isl_tab_pip.c @@ -5276,6 +5276,8 @@ __isl_give isl_tab_lexmin *isl_tab_lexmin_add_eq(__isl_take isl_tab_lexmin *tl, if (!tl || !eq) return isl_tab_lexmin_free(tl); + if (isl_tab_extend_cons(tl->tab, 2) < 0) + return isl_tab_lexmin_free(tl); n_var = tl->tab->n_var; isl_seq_neg(eq, eq, 1 + n_var); tl->tab = add_lexmin_ineq(tl->tab, eq); -- 2.11.4.GIT