From cb7fce24492ff6e0b7df0f33e2ac47970b4281dd Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Sat, 26 Dec 2015 23:26:55 +0100 Subject: apt-helper: Check that we can open stdout Gbp-Dch: ignore --- cmdline/apt-helper.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmdline/apt-helper.cc b/cmdline/apt-helper.cc index e8b16c4e5..a519f3042 100644 --- a/cmdline/apt-helper.cc +++ b/cmdline/apt-helper.cc @@ -114,7 +114,8 @@ static bool DoCatFile(CommandLine &CmdL) /*{{{*/ char buf[4096]; unsigned long long read; - out.OpenDescriptor(STDOUT_FILENO, FileFd::WriteOnly); + if (out.OpenDescriptor(STDOUT_FILENO, FileFd::WriteOnly) == false) + return false; if (CmdL.FileSize() <= 1) return _error->Error("Must specify at least one file name"); -- cgit v1.2.3