Skip to content

Commit

Permalink
Bugfix: Add check for attribute::set_val
Browse files Browse the repository at this point in the history
  • Loading branch information
wqx6 committed Jul 27, 2022
1 parent 4cfcf61 commit ed13200
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions components/esp_matter/esp_matter_attribute_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1035,6 +1035,9 @@ EmberAfStatus emberAfExternalAttributeWriteCallback(EndpointId endpoint_id, Clus
}

/* Update val */
if (val.type == ESP_MATTER_VAL_TYPE_INVALID) {
return EMBER_ZCL_STATUS_FAILURE;
}
attribute::set_val(attribute, &val);
return EMBER_ZCL_STATUS_SUCCESS;
}

0 comments on commit ed13200

Please sign in to comment.