Commit f806df9
committed
fixup! hooks: add custom post-command hook config
The handle_hook_replacement() call in list_hooks_add_default() was
added to interject VFS hook behavior. It dereferences `options->args`,
but `options` can be NULL when called via hook_exists() which passes
NULL for the options parameter through list_hooks().
This causes a UBSAN runtime error (null pointer member access) and
SIGABRT on every code path that calls hook_exists(), which includes
rebase, checkout, commit, and many other commands.
Guard the dereference with an `options` NULL check.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>1 parent 4c0383b commit f806df9
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
248 | | - | |
| 248 | + | |
| 249 | + | |
249 | 250 | | |
250 | 251 | | |
251 | 252 | | |
| |||
0 commit comments