Sfoglia il codice sorgente

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

Michael Vogt 14 anni fa
parent
commit
1c89c98a56
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  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)
 bool IsPgpClearTextSignature(string const &FileName)
 {
 {
    static const char* SIGMSG = "-----BEGIN PGP SIGNED MESSAGE-----\n";
    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");
    FILE* gpg = fopen(FileName.c_str(), "r");
    if (gpg == NULL)
    if (gpg == NULL)
       return false;
       return false;