repo.or.cz
/
isl.git
/
commitdiff
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
raw
|
patch
|
inline
|
side by side
(parent:
e0a8757
)
isl_mat_drop_cols: check for valid column range
author
Sven Verdoolaege
<sven.verdoolaege@gmail.com>
Fri, 8 Sep 2017 10:36:52 +0000
(8 12:36 +0200)
committer
Sven Verdoolaege
<sven.verdoolaege@gmail.com>
Sat, 16 Sep 2017 08:42:56 +0000
(16 10:42 +0200)
Signed-off-by: Sven Verdoolaege <sven.verdoolaege@gmail.com>
isl_mat.c
patch
|
blob
|
blame
|
history
diff --git
a/isl_mat.c
b/isl_mat.c
index
b0ea0e0
..
d444576
100644
(file)
--- a/
isl_mat.c
+++ b/
isl_mat.c
@@
-1401,8
+1401,8
@@
struct isl_mat *isl_mat_drop_cols(struct isl_mat *mat, unsigned col, unsigned n)
return mat;
mat = isl_mat_cow(mat);
- if (
!mat
)
- return
NULL
;
+ if (
check_col_range(mat, col, n) < 0
)
+ return
isl_mat_free(mat)
;
if (col != mat->n_col-n) {
for (r = 0; r < mat->n_row; ++r)