summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2015-12-26 23:26:55 +0100
committerJulian Andres Klode <jak@debian.org>2015-12-26 23:27:15 +0100
commitcb7fce24492ff6e0b7df0f33e2ac47970b4281dd (patch)
tree1ef1ab07d6b83e07aa3360fca1f4fc3995cf65b3
parent01152444ba96051fa0ca90b08dcbb8fec9d81745 (diff)
apt-helper: Check that we can open stdout
Gbp-Dch: ignore
-rw-r--r--cmdline/apt-helper.cc3
1 files changed, 2 insertions, 1 deletions
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");