Heinrich Schuchardt
b6d14c52f9
fru: ops: avoid out of bounds access
...
Building xilinx_zynq_virt_defconfig fails on origin/next as reported by
GCC 10.2 (as provided by Debian Bullseye):
CC board/xilinx/common/fru_ops.o
board/xilinx/common/fru_ops.c: In function ‘fru_capture’:
board/xilinx/common/fru_ops.c:173:8:
error: array subscript 284 is outside array bounds of
‘struct fru_table[1]’ [-Werror=array-bounds]
173 | limit = data + sizeof(struct fru_board_data);
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
board/xilinx/common/fru_ops.c:17:18: note: while referencing ‘fru_data’
17 | struct fru_table fru_data __section(.data);
| ^~~~~~~~
When using sizeof(struct fru_board_data) to find the end of the structure
you should add it to the start of the structure.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2021-01-05 11:54:53 +01:00
..
2020-07-17 09:30:13 -04:00
2020-12-07 08:54:20 +01:00
2020-05-18 21:19:23 -04:00
2020-09-01 14:47:43 +02:00
2020-10-05 17:59:45 +02:00
2020-07-24 14:56:24 +08:00
2020-08-26 09:19:54 +02:00
2020-12-06 15:07:40 +01:00
2020-05-18 21:19:23 -04:00
2020-11-19 09:45:49 -05:00
2020-05-18 21:19:23 -04:00
2020-09-22 11:27:18 +03:00
2020-05-18 21:19:18 -04:00
2020-07-17 09:30:13 -04:00
2020-07-17 09:30:13 -04:00
2020-07-25 14:19:26 +02:00
2020-05-18 21:19:23 -04:00
2020-07-09 20:58:05 +05:30
2020-07-17 09:30:13 -04:00
2020-07-17 09:30:13 -04:00
2020-10-12 08:03:38 +05:30
2020-07-17 09:30:13 -04:00
2020-09-09 16:57:35 -04:00
2020-05-18 21:19:23 -04:00
2020-05-18 21:19:23 -04:00
2020-07-28 19:30:39 -06:00
2020-10-26 20:55:29 +01:00
2020-08-26 09:19:45 +02:00
2020-07-17 09:30:13 -04:00
2020-07-17 09:30:13 -04:00
2020-07-17 09:30:13 -04:00
2020-07-17 09:30:13 -04:00
2020-07-17 09:30:13 -04:00
2020-05-18 21:19:18 -04:00
2020-05-18 21:19:23 -04:00
2020-05-18 21:19:18 -04:00
2020-07-17 09:30:13 -04:00
2020-09-01 13:38:38 +08:00
2020-11-05 14:58:45 +08:00
2020-07-17 09:30:13 -04:00
2020-05-18 21:19:23 -04:00
2020-07-17 09:30:13 -04:00
2020-07-17 09:30:13 -04:00
2020-07-17 09:30:13 -04:00
2020-05-18 21:19:18 -04:00
2020-07-17 09:30:13 -04:00
2020-09-01 13:38:39 +08:00
2020-11-25 10:43:46 +01:00
2020-06-26 10:29:06 -04:00
2020-05-18 21:19:18 -04:00
2020-09-01 13:38:39 +08:00
2020-07-17 09:30:13 -04:00
2020-07-17 09:30:13 -04:00
2020-09-16 16:31:17 +08:00
2020-07-17 09:30:13 -04:00
2020-11-17 15:09:16 +08:00
2020-10-30 23:31:26 +08:00
2020-07-17 09:30:13 -04:00
2020-08-21 19:56:19 +08:00
2020-12-26 12:37:07 +01:00
2020-07-29 08:43:40 -04:00
2020-05-18 21:19:23 -04:00
2020-07-17 09:30:13 -04:00
2020-11-06 10:18:20 +08:00
2020-12-26 14:56:09 +01:00
2020-11-13 18:15:08 +08:00
2020-07-17 09:30:13 -04:00
2020-07-22 20:21:23 +08:00
2020-07-17 09:30:13 -04:00
2020-07-17 09:30:13 -04:00
2020-07-17 09:30:13 -04:00
2020-07-28 19:30:39 -06:00
2020-12-16 13:51:24 +08:00
2020-07-17 09:30:13 -04:00
2020-05-18 17:33:33 -04:00
2020-07-17 09:30:13 -04:00
2020-11-01 15:53:40 +01:00
2020-11-19 09:45:49 -05:00
2020-07-17 09:30:13 -04:00
2020-07-17 09:30:13 -04:00
2020-10-23 16:52:09 +05:30
2020-07-17 09:30:13 -04:00
2020-07-17 09:30:13 -04:00
2020-07-09 06:51:20 +02:00
2020-07-17 09:30:13 -04:00
2020-05-18 17:33:33 -04:00
2020-09-01 14:47:43 +02:00
2020-08-03 22:19:54 -04:00
2020-07-17 09:30:13 -04:00
2020-12-07 07:11:37 +01:00
2020-05-18 17:33:33 -04:00
2020-07-29 08:43:40 -04:00
2020-07-17 09:30:13 -04:00
2020-05-18 17:33:33 -04:00
2020-08-06 14:12:14 +02:00
2020-07-17 09:30:13 -04:00
2020-07-17 09:30:13 -04:00
2020-08-03 22:19:54 -04:00
2020-08-03 17:03:57 +02:00
2020-05-18 21:19:23 -04:00
2020-11-15 15:29:40 +05:30
2020-06-26 10:29:06 -04:00
2020-07-17 09:30:13 -04:00
2020-07-17 09:30:13 -04:00
2020-11-15 15:14:04 +05:30
2020-05-18 21:19:18 -04:00
2020-05-31 22:22:07 +08:00
2020-07-17 09:30:13 -04:00
2020-05-18 17:33:33 -04:00
2020-07-17 09:30:13 -04:00
2020-07-17 09:30:13 -04:00
2020-05-18 17:33:33 -04:00
2020-07-17 09:30:13 -04:00
2020-10-05 14:10:59 -04:00
2020-09-16 16:31:17 +08:00
2020-07-17 09:30:13 -04:00
2020-10-22 17:11:29 +09:00
2020-10-29 14:42:17 -06:00
2020-07-17 09:30:13 -04:00
2020-07-17 09:30:13 -04:00
2020-07-17 09:30:13 -04:00
2020-07-17 09:30:13 -04:00
2020-07-17 09:30:13 -04:00
2020-05-18 17:33:33 -04:00
2020-08-25 10:26:14 +02:00
2020-05-18 21:19:23 -04:00
2020-07-17 09:30:13 -04:00
2020-11-28 08:30:41 +01:00
2020-10-08 11:42:36 -04:00
2020-07-17 09:30:13 -04:00
2020-07-17 09:30:13 -04:00
2020-07-17 09:30:13 -04:00
2020-09-24 10:13:39 +02:00
2020-07-17 09:30:13 -04:00
2020-05-18 21:19:23 -04:00
2020-12-09 10:57:50 +01:00
2020-05-18 17:33:33 -04:00
2020-11-17 00:42:21 +00:00
2020-05-18 21:19:23 -04:00
2020-05-18 21:19:23 -04:00
2020-05-18 21:19:23 -04:00
2020-08-25 10:26:14 +02:00
2020-07-17 09:30:13 -04:00
2020-08-18 10:10:25 +02:00
2020-07-17 09:30:13 -04:00
2020-07-17 09:30:13 -04:00
2020-06-07 18:57:16 +08:00
2020-10-12 07:26:57 -04:00
2020-07-17 09:30:13 -04:00
2020-06-24 13:11:08 +02:00
2020-12-26 14:56:09 +01:00
2020-05-18 21:19:23 -04:00
2020-08-25 10:26:14 +02:00
2020-07-17 09:30:13 -04:00
2020-06-02 17:27:04 -04:00
2020-12-26 14:56:09 +01:00
2020-07-17 09:30:13 -04:00
2020-07-17 09:30:13 -04:00
2020-07-17 09:30:13 -04:00
2020-07-17 09:30:13 -04:00
2020-07-17 09:30:13 -04:00
2020-07-17 09:30:13 -04:00
2020-05-18 21:19:23 -04:00
2020-08-24 14:11:31 -04:00
2020-07-17 09:30:13 -04:00
2021-01-05 11:54:53 +01:00
2020-05-18 17:33:33 -04:00