From 783ee496a6914df68e77e6019054ad91e8ed6420 Mon Sep 17 00:00:00 2001 From: tbeu Date: Thu, 23 Nov 2017 19:50:32 +0100 Subject: [PATCH] Fix null pointer dereference As reported by honggfuzz --- tools/matdump.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/matdump.c b/tools/matdump.c index bf563e3d..1cabded6 100644 --- a/tools/matdump.c +++ b/tools/matdump.c @@ -681,6 +681,10 @@ static void print_default_numeric_3d(matvar_t *matvar) { size_t i, j, k, l, stride; + + if ( NULL == matvar->data ) + return; + stride = Mat_SizeOf(matvar->data_type); if ( matvar->isComplex ) { mat_complex_split_t *complex_data = (mat_complex_split_t*)matvar->data;