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

pull/320/head
Michael Zillgith 5 years ago
parent dbcacec7d8
commit 058bc2edf7

@ -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