diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-11-21 02:25:10 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-11-21 02:25:10 +0000 |
commit | e4e8ea090c73cd6826d125d26fdc1e2463938048 (patch) | |
tree | b0cb31fba99d97d596f865044b2bcb67443f9bb8 | |
parent | 28b8022ccd4dbe629ad770e06ea4116ffd30258f (diff) | |
download | perl-URPM-e4e8ea090c73cd6826d125d26fdc1e2463938048.tar perl-URPM-e4e8ea090c73cd6826d125d26fdc1e2463938048.tar.gz perl-URPM-e4e8ea090c73cd6826d125d26fdc1e2463938048.tar.bz2 perl-URPM-e4e8ea090c73cd6826d125d26fdc1e2463938048.tar.xz perl-URPM-e4e8ea090c73cd6826d125d26fdc1e2463938048.zip |
workaround a segfault (mga#8158)
calling ->provides or ->requires in traverse_tag_find() results in an
invalid read if provides/requires list is big (or if called several
times)
basically reverting commit r6476 on 2012-11-16
("(unsatisfied_requires) (slightly) optimize")
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | URPM/Resolve.pm | 4 |
2 files changed, 4 insertions, 2 deletions
@@ -1,3 +1,5 @@ +- workaround a segfault (mga#8158) + Version 4.17 - 19 November 2012 - bump threshold for detecting looping forever (mga#8106) diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm index a906ea5..6ac7ad6 100644 --- a/URPM/Resolve.pm +++ b/URPM/Resolve.pm @@ -491,14 +491,14 @@ sub unsatisfied_requires { #- check on installed system if a package which is not obsoleted is satisfying the require. my $satisfied = 0; if ($n =~ m!^/!) { - $db->traverse_tag_find('path', $n, sub { + $db->traverse_tag('path', [ $n ], sub { my ($p) = @_; exists $state->{rejected}{$p->fullname} and return; $state->{cached_installed}{$n}{$p->fullname} = undef; ++$satisfied; }); } else { - $db->traverse_tag_find('whatprovides', $n, sub { + $db->traverse_tag('whatprovides', [ $n ], sub { my ($p) = @_; exists $state->{rejected}{$p->fullname} and return; foreach ($p->provides) { |