Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
of/selftest: Fix off-by-one error in removal path
The removal path for selftest data has an off by one error that causes the code to dereference beyond the end of the nodes[] array on the first pass through. The old code only worked by chance on a lot of platforms, but the bug was recently exposed on aarch64. The fix is simple. Decrement the node count before dereferencing, not after. Reported-by: Kevin Hilman <[email protected]> Cc: Rob Herring <[email protected]> Cc: Gaurav Minocha <[email protected]> Cc: <[email protected]> # v3.17+
- Loading branch information