Kaynağa Gözat

apt-helper: Check that we can open stdout

Gbp-Dch: ignore
Julian Andres Klode 10 yıl önce
ebeveyn
işleme
cb7fce2449
1 değiştirilmiş dosya ile 2 ekleme ve 1 silme
  1. 2 1
      cmdline/apt-helper.cc

+ 2 - 1
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");