gcc-12
is able to detect uuid
type overred as:
In file included from ...-glibc-2.35-224-dev/include/string.h:535,
from omx_base_component.h:32,
from omx_base_component.c:34:
In function 'memcpy',
inlined from 'omx_base_component_GetComponentVersion' at omx_base_component.c:830:3:
...-glibc-2.35-224-dev/include/bits/string_fortified.h:29:10: error: '__builtin_memcpy'
forming offset [24, 71] is out of the bounds [0, 24] of object 'uuid' with type 'OMX_U32[3]'
{aka 'long unsigned int[3]'} [-Werror=array-bounds]
29 | return __builtin___memcpy_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
30 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
omx_base_component.c: In function 'omx_base_component_GetComponentVersion':
omx_base_component.c:810:11: note: 'uuid' declared here
810 | OMX_U32 uuid[3];
| ^~~~
The change sets toe size of uid
for memcpy() call.