From 2b803d4069e1f05d0461fbad004482ff02100812 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 16 Jun 2012 19:55:43 +0200 Subject: do not dereference the storage for the unique strings as the pointer can change at the time of writing the strings, so first store it temporary and then save the index in the (possibily new) pointer location --- apt-pkg/deb/debindexfile.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'apt-pkg/deb/debindexfile.cc') diff --git a/apt-pkg/deb/debindexfile.cc b/apt-pkg/deb/debindexfile.cc index 76c740341..de645bb6e 100644 --- a/apt-pkg/deb/debindexfile.cc +++ b/apt-pkg/deb/debindexfile.cc @@ -602,7 +602,8 @@ bool debStatusIndex::Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const pkgCache::PkgFileIterator CFile = Gen.GetCurFile(); CFile->Size = Pkg.FileSize(); CFile->mtime = Pkg.ModificationTime(); - CFile->Archive = Gen.WriteUniqString("now"); + map_ptrloc const storage = Gen.WriteUniqString("now"); + CFile->Archive = storage; if (Gen.MergeList(Parser) == false) return _error->Error("Problem with MergeList %s",File.c_str()); -- cgit v1.2.3