Infineon / optiga-trust-x

OPTIGA™ Trust X Software Framework
MIT License
37 stars 19 forks source link

Warning in example_optiga_util_write_data.c #34

Closed panmasuo closed 4 years ago

panmasuo commented 4 years ago

Hi, While compiling example in example_optiga_util_write_data.c i am getting a warning:

[...] examples/optiga/example_optiga_util_write_data.c:128:59: warning: array subscript 27 is aboce array bound of 'uint8_t[27]' {aka 'unsigned char[27]'} [-Warray-bounds]

It's referring to this file's line 120.

if ((coprocessor_uid[26] < 11) || (coprocessor_uid[27] < 18))

While coprocessor_uid is initialised as array of length 27 uint8_t coprocessor_uid[27];

is this a mistake or was it done with premeditation?

ayushev commented 4 years ago

Thanks for hint and sorry for the late reply, we somehow overlooked your issue.