From: Han Young Date: Wed, 11 Feb 2026 04:11:27 GMT Subject: [PATCH 0/1] diffcore-break: prevent dangling pointer Message-ID: <20260211041128.48412-1-hanyang.tony@bytedance.com> The diffcore_break function in diffcore-break.c forgets to set the queue reference to NULL after freeing it. In a blobless cloned repository, the queue could be accessed by prefetch and result in a segmentation fault. This bug is only triggered if: * the repository is partially cloned * the diff operation triggers prefetch * a diff is split into delete and create before prefetching I've prepared a example repository that triggers this bug. git clone git@github.com:hanyang-tony/dangle_sanitize.git --filter=blob:none cd dangle_sanitize # download the old version of the file # to ensure the splited diff exists in local repository git checkout HEAD~1 .iac # reset the file so we have a diff git reset --hard HEAD # segmentation fault git reset HEAD~1 Here is how to create the example repository: mkdir example && cd example && git init mkdir -p .iac/configs/devops cat >.iac/configs/devops/config.yml <> foo.c git add -A && git commit -m init echo baz >> foo.c cat >.iac/configs/devops/config.yml <