]> git.saurik.com Git - apt.git/blobdiff - cmdline/apt-cache.cc
Merge branch 'debian/sid' into debian/experimental
[apt.git] / cmdline / apt-cache.cc
index 88a3232800385f7980a5c0793b78852fabe32740..1447feb811aa47f8c032a275c3d03a0a48ade7d9 100644 (file)
@@ -1330,8 +1330,8 @@ static bool Search(CommandLine &CmdL)
    ExDescFile *DFList = new ExDescFile[descCount];
    memset(DFList,0,sizeof(*DFList) * descCount);
 
-   bool PatternMatch[descCount * NumPatterns];
-   memset(PatternMatch,false,sizeof(PatternMatch));
+   bool *PatternMatch = new bool[descCount * NumPatterns];
+   memset(PatternMatch,false,sizeof(*PatternMatch) * descCount * NumPatterns);
 
    // Map versions that we want to write out onto the VerList array.
    for (pkgCache::GrpIterator G = Cache->GrpBegin(); G.end() == false; ++G)
@@ -1441,6 +1441,7 @@ static bool Search(CommandLine &CmdL)
    }
    
    delete [] DFList;
+   delete [] PatternMatch;
    for (unsigned I = 0; I != NumPatterns; I++)
       regfree(&Patterns[I]);
    if (ferror(stdout))