diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2018-10-09 23:37:28 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2018-10-09 23:45:08 +0100 |
commit | 8ac9071b25d42de4f1f6b9ade2f8d36d8d91b135 (patch) | |
tree | 197df0fa280a291f9ea8727a57147a8bd138bee9 /Debian/Dgit.pm | |
parent | 8381243a5f0a311bdf8ef2c8d695d7993de76a9d (diff) |
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 <mattia@debian.org>
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'Debian/Dgit.pm')
-rw-r--r-- | Debian/Dgit.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Debian/Dgit.pm b/Debian/Dgit.pm index 39c4598..edc57f1 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; |