diff options
author | Sven Verdoolaege <skimo@kotnet.org> | 2010-06-25 18:43:01 +0200 |
---|---|---|
committer | Sven Verdoolaege <skimo@kotnet.org> | 2010-06-26 17:37:39 +0200 |
commit | 94f0a851ad05981dd2db4234df6416774d7fa533 (patch) | |
tree | 2cdcefbf4dbd39eff9dd5a63f9591467f1075773 /isl_sample.c | |
parent | 529c3fd83e13177c49c33f7d7ddc122bcf4b25be (diff) | |
download | isl-94f0a851ad05981dd2db4234df6416774d7fa533.tar.gz isl-94f0a851ad05981dd2db4234df6416774d7fa533.tar.bz2 isl-94f0a851ad05981dd2db4234df6416774d7fa533.zip |
isl_sample.c: interval_sample: avoid NULL pointer dereference
Diffstat (limited to 'isl_sample.c')
-rw-r--r-- | isl_sample.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/isl_sample.c b/isl_sample.c index 3564f802..8a99d7e1 100644 --- a/isl_sample.c +++ b/isl_sample.c @@ -61,6 +61,10 @@ static struct isl_vec *interval_sample(struct isl_basic_set *bset) return zero_sample(bset); sample = isl_vec_alloc(bset->ctx, 2); + if (!sample) + goto error; + if (!bset) + return NULL; isl_int_set_si(sample->block.data[0], 1); if (bset->n_eq > 0) { |