Skip to content

Commit 783ee49

Browse files
committed
Fix null pointer dereference
As reported by honggfuzz
1 parent 702fd2d commit 783ee49

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: tools/matdump.c

+4
Original file line numberDiff line numberDiff line change
@@ -681,6 +681,10 @@ static void
681681
print_default_numeric_3d(matvar_t *matvar)
682682
{
683683
size_t i, j, k, l, stride;
684+
685+
if ( NULL == matvar->data )
686+
return;
687+
684688
stride = Mat_SizeOf(matvar->data_type);
685689
if ( matvar->isComplex ) {
686690
mat_complex_split_t *complex_data = (mat_complex_split_t*)matvar->data;

0 commit comments

Comments
 (0)