Permalink
Browse files

Fix access violation: Skip complex char array of v4 MAT file

As reported by honggfuzz
  • Loading branch information...
tbeu committed Nov 23, 2017
1 parent 783ee49 commit 3e6283f37652e29e457ab9467f7738a562594b6b
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/mat4.c
View
@@ -857,6 +857,10 @@ Mat_VarReadNextInfo4(mat_t *mat)
Mat_VarFree(matvar);
return NULL;
}
if ( matvar->isComplex && MAT_C_CHAR == matvar->class_type ) {
Mat_VarFree(matvar);
return NULL;
}
err = fread(&tmp,sizeof(int),1,(FILE*)mat->fp);
if ( !err ) {
Mat_VarFree(matvar);

0 comments on commit 3e6283f

Please sign in to comment.