]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/deb/debindexfile.cc
fix insecure use of /tmp in EDSP solver 'dump'
[apt.git] / apt-pkg / deb / debindexfile.cc
index d3599b35369bf09679e58b4a464c217a5f558f7f..32ccd75291fe212503d114e04958a3ef3d5f678a 100644 (file)
@@ -27,6 +27,7 @@
 #include <stdio.h>
 #include <iostream>
 #include <string>
+#include <sstream>
 
 #include <sys/stat.h>
                                                                        /*}}}*/
@@ -144,6 +145,17 @@ uint8_t debStatusIndex::GetIndexFlags() const
 {
    return pkgCache::Flag::NotSource;
 }
+
+pkgCacheListParser * debStatusIndex::CreateListParser(FileFd &Pkg)
+{
+   if (Pkg.IsOpen() == false)
+      return NULL;
+   _error->PushToStack();
+   pkgCacheListParser * const Parser = new debStatusListParser(&Pkg);
+   bool const newError = _error->PendingError();
+   _error->MergeWithStack();
+   return newError ? NULL : Parser;
+}
                                                                        /*}}}*/
 // DebPkgFile Index - a single .deb file as an index                   /*{{{*/
 debDebPkgFileIndex::debDebPkgFileIndex(std::string const &DebFile)