kwbimage: Fix out of bounds access
The kwbimage format is reading beyond its header structure if it misdetects a Xilinx Zynq image and tries to read it. Fix it by sanity checking that the header we want to read fits inside our file size. Signed-off-by: NAlexander Graf <agraf@suse.de> Tested-by: NMichal Simek <michal.simek@xilinx.com> Reviewed-by: NStefan Roese <sr@denx.de> Signed-off-by: NStefan Roese <sr@denx.de>
Showing
想要评论请 注册 或 登录