Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/include/sof/tlv.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ static inline void tlv_value_get(const void *data,
const struct sof_tlv *tlv = (const struct sof_tlv *)data;
const uint32_t end_addr = (uint32_t)data + size;

while ((uint32_t)tlv < end_addr) {
while (tlv && (uint32_t)tlv < end_addr) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@abonislawski so if we hit tlv == NULL here the function will return with no error and the caller will assume, that it has succeeded...

if (tlv->type == type) {
*value = (void *)tlv->value;
*length = tlv->length;
Expand Down
Loading