mirror of
https://github.com/openharmony/third_party_libfuse.git
synced 2026-08-26 11:29:19 -04:00
f74bbc024e
fuse_lib_lookup's ".." (LOOKUP-DOTDOT) branch dereferenced get_node(f, parent)->parent->nodeid without checking ->parent for NULL. The root node (FUSE_ROOT_ID) has parent == NULL permanently, so a LOOKUP ".." on the root inode null-dereferenced (SIGSEGV). Add a pn->parent == NULL guard before the dereference and return -ESTALE when the parent is NULL, consistent with the "." branch's stale-entry response. Co-Authored-By: Agent Signed-off-by: markcarter <liuhaotian15@h-partners.com> 🤖 AI[100%] 🔧 Human Fixed[0%] 🧑 Human[0%] 👌 AI Adopted[100%] Co-authored-by: opencode (glm-5.2) <ai@local> Change-Id: I5ae737ed5d6d7110d7159ed6166f8f1fd6b065c9