mirror of
https://github.com/dgibson/dtc.git
synced 2026-04-11 16:37:42 -04:00
livetree: fix off-by-one in propval_cell_n() bounds check
Signed-off-by: Johannes Beisswenger <johannes.beisswenger@cetitec.com>
This commit is contained in:
parent
f1657b2fb5
commit
73f06f571b
1 changed files with 1 additions and 1 deletions
|
|
@ -441,7 +441,7 @@ cell_t propval_cell(struct property *prop)
|
|||
|
||||
cell_t propval_cell_n(struct property *prop, unsigned int n)
|
||||
{
|
||||
assert(prop->val.len / sizeof(cell_t) >= n);
|
||||
assert(prop->val.len / sizeof(cell_t) > n);
|
||||
return fdt32_to_cpu(*((fdt32_t *)prop->val.val + n));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue