Skip to content

Commit

Permalink
Fix access violation: Skip complex char array of v4 MAT file
Browse files Browse the repository at this point in the history
As reported by honggfuzz
  • Loading branch information
tbeu committed Nov 23, 2017
1 parent 783ee49 commit 3e6283f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/mat4.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3e6283f

Please sign in to comment.