Files
git/builtin
Deveshi Dwivedi 5ad63f32da worktree: do not pass strbuf by value
write_worktree_linking_files() takes two struct strbuf parameters by
value, even though it only reads path strings from them.

Passing a strbuf by value is misleading and dangerous. The structure
carries a pointer to its underlying character array; caller and callee
end up sharing that storage.  If the callee ever causes the strbuf to
be reallocated, the caller's copy becomes a dangling pointer, which
results in a double-free when the caller does strbuf_release().

The function only needs the string values, not the strbuf machinery.
Switch it to take const char * and update all callers to pass .buf.

Signed-off-by: Deveshi Dwivedi <deveshigurgaon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-03-09 11:28:25 -07:00
..
2025-11-19 10:55:39 -08:00
2026-02-20 08:13:58 -08:00
2024-12-13 07:33:36 -08:00
2025-07-23 08:15:18 -07:00
2025-09-29 11:40:35 -07:00
2025-07-23 08:15:18 -07:00
2026-02-20 08:13:58 -08:00
2026-02-23 13:23:41 -08:00
2025-07-23 08:15:18 -07:00
2025-07-23 08:15:18 -07:00
2025-07-01 14:46:38 -07:00
2026-03-04 10:53:02 -08:00
2025-08-22 13:13:20 -07:00
2024-12-18 10:44:31 -08:00
2025-07-16 22:16:15 -07:00
2025-12-25 08:29:27 +09:00
2025-08-21 13:47:00 -07:00
2025-10-02 12:26:12 -07:00
2025-07-23 08:15:18 -07:00
2025-11-19 10:55:39 -08:00
2026-02-20 08:13:58 -08:00
2025-07-23 08:15:18 -07:00
2025-09-16 11:37:06 -07:00
2025-08-21 13:46:59 -07:00