From 26880800630424c383fc26fdbde4c9fde114fbd0 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Wed, 5 Jun 2013 09:52:08 +0200 Subject: [PATCH] isl_basic_map_contains: avoid invalid access on error path Signed-off-by: Sven Verdoolaege --- isl_map.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/isl_map.c b/isl_map.c index c4636c14..17915e1d 100644 --- a/isl_map.c +++ b/isl_map.c @@ -2708,6 +2708,9 @@ int isl_basic_map_contains(struct isl_basic_map *bmap, struct isl_vec *vec) unsigned total; isl_int s; + if (!bmap || !vec) + return -1; + total = 1 + isl_basic_map_total_dim(bmap); if (total != vec->size) return -1; -- 2.11.4.GIT