- MmsValue_equalTypes: check parameters for NULL to avoid dereferencing NULL pointer

pull/331/head
Michael Zillgith 5 years ago
parent e04e424b02
commit ed810fde0f

@ -193,6 +193,9 @@ MmsValue_equals(const MmsValue* self, const MmsValue* otherValue)
bool bool
MmsValue_equalTypes(const MmsValue* self, const MmsValue* otherValue) MmsValue_equalTypes(const MmsValue* self, const MmsValue* otherValue)
{ {
if ((self == NULL) || (otherValue == NULL))
return false;
if (self->type == otherValue->type) { if (self->type == otherValue->type) {
switch (self->type) switch (self->type)
{ {

Loading…
Cancel
Save