]> git.ozlabs.org Git - petitboot/commit
discover/boot: Copy local paths before running boot hooks
authorJeremy Kerr <jk@ozlabs.org>
Thu, 5 Dec 2013 06:54:13 +0000 (14:54 +0800)
committerJeremy Kerr <jk@ozlabs.org>
Thu, 5 Dec 2013 07:11:46 +0000 (15:11 +0800)
commit6c40be15d13765c004e3568cd50b543e1fb74648
tree7a57bf3aa3c46c43f1917bf39ebb767ba8098ed1
parent97cf71f1f2f07210bc160d1f04c0b13d5bcd5b74
discover/boot: Copy local paths before running boot hooks

We're seeing a crash when boot hooks are specifying new resources, as
boot_hook_update_param will write to a NULL struct load_url_result.

Instead of writing the updated values to the struct, copy the local
parts of the result to a separate string, which the boot hooks are free
to update.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
discover/boot.c