Skip to content

Commit 26363e6

Browse files
committed
kernel: make FuncCONV_MAT8BIT more resilient
... against invalid inputs
1 parent 91a3c92 commit 26363e6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/vec8bit.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3347,7 +3347,11 @@ static Obj FuncCONV_MAT8BIT(Obj self, Obj list, Obj q)
33473347
GROW_PLIST(list, len + 1);
33483348
for (i = len; i >= 1; i--) {
33493349
tmp = ELM_PLIST(list, i);
3350-
GAP_ASSERT(IS_VEC8BIT_REP(tmp));
3350+
if (!IS_VEC8BIT_REP(tmp)) {
3351+
ErrorMayQuit("CONV_MAT8BIT: argument must be a list of "
3352+
"compressed 8bit vectors", 0, 0);
3353+
}
3354+
33513355
type = TypeVec8BitLocked(iq, IS_MUTABLE_OBJ(tmp));
33523356
SetTypeDatObj(tmp, type);
33533357
SET_ELM_MAT8BIT(list, i, tmp);

0 commit comments

Comments
 (0)