summaryrefslogtreecommitdiff
path: root/builtin/commit-graph.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2023-12-07 02:11:32 -0500
committerJunio C Hamano <gitster@pobox.com>2023-12-09 08:24:47 +0900
commit1b274c98341ef17f3bbfe80f603f629e7c950668 (patch)
tree77116aa5747296a1210b131c46184992133c9119 /builtin/commit-graph.c
parent34b1a0d320e3a1531997d6681bacffbe9da7a046 (diff)
trailer: handle NULL value when parsing trailer-specific config
When parsing the "key", "command", and "cmd" trailer config, we just make a copy of the value string. If we see an implicit bool like: [trailer "foo"] key we'll segfault trying to copy a NULL pointer. We can fix this with the usual config_error_nonbool() check. I split this out from the other vanilla cases, because at first glance it looks like a better fix here would be to move the NULL check out of the switch statement. But it would change the behavior of other keys like trailer.*.ifExists, where an implicit bool is interpreted as EXISTS_DEFAULT. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit-graph.c')
0 files changed, 0 insertions, 0 deletions