From 058bc2edf7173ef8f04476b407c7fed90d6e0909 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 53337ed2..7b38ff84 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) {