Skip to content
Commit 2f945a79 authored by Sergey Shtylyov's avatar Sergey Shtylyov Committed by Rob Herring
Browse files

of: fdt: fix off-by-one error in unflatten_dt_nodes()



Commit 78c44d91 ("drivers/of: Fix depth when unflattening devicetree")
forgot to fix up the depth check in the loop body in unflatten_dt_nodes()
which makes it possible to overflow the nps[] buffer...

Found by Linux Verification Center (linuxtesting.org) with the SVACE static
analysis tool.

Fixes: 78c44d91 ("drivers/of: Fix depth when unflattening devicetree")
Signed-off-by: default avatarSergey Shtylyov <s.shtylyov@omp.ru>
Signed-off-by: default avatarRob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/7c354554-006f-6b31-c195-cdfe4caee392@omp.ru
parent 568035b0
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment