libfdt: fix undefined behaviour in _fdt_splice()
authorJan Beulich <jbeulich@suse.com>
Tue, 17 Mar 2020 15:20:08 +0000 (16:20 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 17 Mar 2020 15:20:08 +0000 (16:20 +0100)
commit1faa954df18733792c33b3f5b1b4de4662cfa892
tree1c60119215cc17db5ff8e4ec2b1204369dc1c36f
parent66fb1406568c7e582dbd5ffd8f3b8a8350146960
libfdt: fix undefined behaviour in _fdt_splice()

Along the lines of commit d0b3ab0a0f46 ("libfdt: Fix undefined behaviour
in fdt_offset_ptr()"), _fdt_splice() similarly may not use pointer
arithmetic to do overflow checks.

[upstream commit 73d6e9ecb4179b510408bc526240f829262df361]
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Julien Grall <jgrall@amazon.com>
xen/common/libfdt/fdt_rw.c