usr.sbin/makefs: fix use-after-free in read_mtree_keywords()
commit2a7b29081fc07850383b0a851c4d32b553412522
authorTomohiro Kusumi <tkusumi@netbsd.org>
Sun, 31 Oct 2021 15:25:27 +0000 (1 00:25 +0900)
committerTomohiro Kusumi <tkusumi@netbsd.org>
Sun, 31 Oct 2021 15:25:27 +0000 (1 00:25 +0900)
tree838e0414b4f75515abcc79af99eafb20f7d7e025
parentc3ba2018f9c7e075ad7429043b57c2fe146306d7
usr.sbin/makefs: fix use-after-free in read_mtree_keywords()

The st variable is used as a shortcut for &node->inode->st, but in one
branch just before the exit we update node->inode without changing st.

taken from FreeBSD 12ad8bdb34aa990bcc4f3faa92a6e0557385d2b2
usr.sbin/makefs/mtree.c