summaryrefslogtreecommitdiff
path: root/isl_coalesce.c
diff options
context:
space:
mode:
authorSven Verdoolaege <skimo@kotnet.org>2010-06-26 11:38:22 +0200
committerSven Verdoolaege <skimo@kotnet.org>2010-06-26 17:37:40 +0200
commitf421b0bf4bafb22a1eacc5f9550aa8b8f441321d (patch)
tree5bd86c4a0c6eab67088a74caa1c31ad5d5f17eb6 /isl_coalesce.c
parentbc84aa55af2e442e04ec0d7f35e088a81a509394 (diff)
downloadisl-f421b0bf4bafb22a1eacc5f9550aa8b8f441321d.tar.gz
isl-f421b0bf4bafb22a1eacc5f9550aa8b8f441321d.tar.bz2
isl-f421b0bf4bafb22a1eacc5f9550aa8b8f441321d.zip
isl_coalesce.c: coalesce_pair: avoid NULL pointer dereference
Diffstat (limited to 'isl_coalesce.c')
-rw-r--r--isl_coalesce.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/isl_coalesce.c b/isl_coalesce.c
index 84a5a4b0..9f314418 100644
--- a/isl_coalesce.c
+++ b/isl_coalesce.c
@@ -1015,24 +1015,32 @@ static int coalesce_pair(struct isl_map *map, int i, int j,
int *ineq_j = NULL;
eq_i = eq_status_in(map, i, j, tabs);
+ if (!eq_i)
+ goto error;
if (any(eq_i, 2 * map->p[i]->n_eq, STATUS_ERROR))
goto error;
if (any(eq_i, 2 * map->p[i]->n_eq, STATUS_SEPARATE))
goto done;
eq_j = eq_status_in(map, j, i, tabs);
+ if (!eq_j)
+ goto error;
if (any(eq_j, 2 * map->p[j]->n_eq, STATUS_ERROR))
goto error;
if (any(eq_j, 2 * map->p[j]->n_eq, STATUS_SEPARATE))
goto done;
ineq_i = ineq_status_in(map, i, j, tabs);
+ if (!ineq_i)
+ goto error;
if (any(ineq_i, map->p[i]->n_ineq, STATUS_ERROR))
goto error;
if (any(ineq_i, map->p[i]->n_ineq, STATUS_SEPARATE))
goto done;
ineq_j = ineq_status_in(map, j, i, tabs);
+ if (!ineq_j)
+ goto error;
if (any(ineq_j, map->p[j]->n_ineq, STATUS_ERROR))
goto error;
if (any(ineq_j, map->p[j]->n_ineq, STATUS_SEPARATE))