From ed810fde0f8396dc017dc9849d1b9e00b7e74290 Mon Sep 17 00:00:00 2001 From: Michael Zillgith Date: Sat, 27 Feb 2021 12:39:55 +0100 Subject: [PATCH] - MmsValue_equalTypes: check parameters for NULL to avoid dereferencing NULL pointer --- src/mms/iso_mms/common/mms_value.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mms/iso_mms/common/mms_value.c b/src/mms/iso_mms/common/mms_value.c index 3e155320..02d66814 100644 --- a/src/mms/iso_mms/common/mms_value.c +++ b/src/mms/iso_mms/common/mms_value.c @@ -193,6 +193,9 @@ MmsValue_equals(const MmsValue* self, const MmsValue* otherValue) bool MmsValue_equalTypes(const MmsValue* self, const MmsValue* otherValue) { + if ((self == NULL) || (otherValue == NULL)) + return false; + if (self->type == otherValue->type) { switch (self->type) {