milan-avb: move teh descriptor FAM at the end of the structure to avoid overflow

This commit is contained in:
hackerman-kl 2026-04-26 13:03:10 +02:00 committed by Wim Taymans
parent 4d33f57325
commit 0bf4864d84
14 changed files with 126 additions and 204 deletions

View file

@ -115,7 +115,7 @@ static int handle_read_descriptor_common(struct aecp *aecp, int64_t now, const v
memcpy(buf, m, len);
memcpy(buf + size, desc->ptr, desc->size);
memcpy(buf + size, descriptor_body(desc), desc->size);
size += desc->size;
psize += desc->size;
@ -158,7 +158,7 @@ static int handle_get_avb_info_common(struct aecp *aecp, int64_t now,
if (len < 0 || (size_t)len > sizeof(buf))
return reply_status(aecp, AVB_AECP_AEM_STATUS_BAD_ARGUMENTS, m, len);
avb_interface = desc->ptr;
avb_interface = descriptor_body(desc);
memcpy(buf, m, len);