Skip to content

Commit e48f724

Browse files
committed
When TRACE2 analytics is enabled, a git config option that has no value
causes a segfault. Steps to Reproduce GIT_TRACE2=true GIT_TRACE2_CONFIG_PARAMS=status.* git -c status.relativePaths version Expected Result git version 2.46.0 Actual Result zsh: segmentation fault GIT_TRACE2=true This adds checks to prevent the segfault and instead return an empty value. Signed-off-by: Adam Murray <[email protected]>
1 parent 627d9b5 commit e48f724

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

trace2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,7 @@ void trace2_def_param_fl(const char *file, int line, const char *param,
759759
int j;
760760
const char *redacted;
761761

762-
if (!trace2_enabled || !value)
762+
if (!trace2_enabled)
763763
return;
764764

765765
redacted = value ? redact_arg(value): NULL;

0 commit comments

Comments
 (0)