mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 0/2] of: overlay: avoid potential null pointer exception
@ 2022-09-05 10:07 Michael Riesch
  2022-09-05 10:07 ` [PATCH 1/2] of: overlay: improve error handling in of_overlay_apply_tree Michael Riesch
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Michael Riesch @ 2022-09-05 10:07 UTC (permalink / raw)
  To: barebox; +Cc: Michael Riesch

Hi all,

The function of_overlay_fix_path returns NULL in certain error cases but
of_overlay_apply_symbols (which is the only caller) does not check the
return value. For broken overlays this may result in a null pointer
exception. Fix this by checking the return value and inform the user
what exactly went wrong. To this end, improve the error handling in
of_overlay_apply_tree.

The thread [0] gives a bit more context.

Best regards,
Michael

[0] https://lore.barebox.org/barebox/95ff064f-aa11-c1ce-9d41-e38f2040c565@wolfvision.net/T/#u

Michael Riesch (2):
  of: overlay: improve error handling in of_overlay_apply_tree
  of: overlay: avoid potential null pointer exception

 drivers/of/overlay.c | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

-- 
2.30.2




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-09-21 10:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-05 10:07 [PATCH 0/2] of: overlay: avoid potential null pointer exception Michael Riesch
2022-09-05 10:07 ` [PATCH 1/2] of: overlay: improve error handling in of_overlay_apply_tree Michael Riesch
2022-09-21  6:55   ` Michael Riesch
2022-09-21  7:57     ` Michael Tretter
2022-09-21 10:00       ` Michael Riesch
2022-09-05 10:07 ` [PATCH 2/2] of: overlay: avoid potential null pointer exception Michael Riesch
2022-09-12  9:16 ` [PATCH 0/2] " Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox