Przeglądaj źródła

cherry pick -r1846 from bzr+ssh://bazaar.launchpad.net/~mvo/apt/lp346386/

Michael Vogt 14 lat temu
rodzic
commit
1c89c98a56
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      apt-pkg/contrib/fileutl.cc

+ 1 - 1
apt-pkg/contrib/fileutl.cc

@@ -858,7 +858,7 @@ bool ExecWait(pid_t Pid,const char *Name,bool Reap)
 bool IsPgpClearTextSignature(string const &FileName)
 {
    static const char* SIGMSG = "-----BEGIN PGP SIGNED MESSAGE-----\n";
-   char buffer[sizeof(SIGMSG)];
+   char buffer[strlen(SIGMSG)+1];
    FILE* gpg = fopen(FileName.c_str(), "r");
    if (gpg == NULL)
       return false;