HCoop
/
ntk
/
apt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
194fac6
)
apt-pkg/pkgcachegen.cc: copy Arch to avoid segfault on cache remap
author
Michael Vogt
<michael.vogt@ubuntu.com>
Mon, 1 Aug 2011 10:57:04 +0000
(12:57 +0200)
committer
Michael Vogt
<michael.vogt@ubuntu.com>
Mon, 1 Aug 2011 10:57:04 +0000
(12:57 +0200)
apt-pkg/pkgcachegen.cc
patch
|
blob
|
blame
|
history
diff --git
a/apt-pkg/pkgcachegen.cc
b/apt-pkg/pkgcachegen.cc
index
efd764b
..
2bfb776
100644
(file)
--- a/
apt-pkg/pkgcachegen.cc
+++ b/
apt-pkg/pkgcachegen.cc
@@
-636,7
+636,9
@@
bool pkgCacheGenerator::FinishCache(OpProgress *Progress)
Dynamic<pkgCache::VerIterator> DynV(V);
for (; V.end() != true; V++)
{
- char const * const Arch = P.Arch();
+ // copy P.Arch() into a string here as a cache remap
+ // in NewDepends() later may alter the pointer location
+ string Arch = P.Arch() == NULL ? "" : P.Arch();
map_ptrloc *OldDepLast = NULL;
/* MultiArch handling introduces a lot of implicit Dependencies:
- MultiArch: same → Co-Installable if they have the same version