From: Julian Andres Klode Date: Sat, 26 Dec 2015 22:26:55 +0000 (+0100) Subject: apt-helper: Check that we can open stdout X-Git-Tag: 1.1.8~1 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/cb7fce24492ff6e0b7df0f33e2ac47970b4281dd?ds=sidebyside apt-helper: Check that we can open stdout Gbp-Dch: ignore --- 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");