From 8ac9071b25d42de4f1f6b9ade2f8d36d8d91b135 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 9 Oct 2018 23:37:28 +0100 Subject: [PATCH] Dgit.pm: git_cat_file: When passed undef, crash with \n at end Interpolating $objname into this string means that the crash occors before "GCFF>| " has been "printed" - but actually sits in a stdio buffer, waiting to appear after the output from confess. Reported-by: Mattia Rizzolo Signed-off-by: Ian Jackson --- Debian/Dgit.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Debian/Dgit.pm b/Debian/Dgit.pm index 39c45983..edc57f12 100644 --- a/Debian/Dgit.pm +++ b/Debian/Dgit.pm @@ -457,7 +457,7 @@ sub git_cat_file ($;$) { debugcmd "GCF|", @cmd; $gcf_pid = open2 $gcf_o, $gcf_i, @cmd or confess $!; } - printdebug "GCF>| ", $objname, "\n"; + printdebug "GCF>| $objname\n"; print $gcf_i $objname, "\n" or confess $!; my $x = <$gcf_o>; printdebug "GCF<| ", $x; -- 2.30.2