mirror of
https://github.com/dgibson/dtc.git
synced 2025-10-13 16:27:39 -04:00
livetree: fix off-by-one in propval_cell_n() bounds check
Signed-off-by: Johannes Beisswenger <johannes.beisswenger@cetitec.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
ab481e4830
commit
b2b9671583
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