=================================================================== RCS file: /cvs/openbsd/fill_chroot/find_depends,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- openbsd/fill_chroot/find_depends 2008/04/22 21:08:41 1.7 +++ openbsd/fill_chroot/find_depends 2008/05/05 19:58:18 1.8 @@ -1,5 +1,5 @@ #!/usr/bin/perl -# $RedRiver: find_depends,v 1.6 2007/05/16 19:55:42 andrew Exp $ +# $RedRiver: find_depends,v 1.7 2008/04/22 20:08:41 andrew Exp $ use strict; use warnings; @@ -67,6 +67,7 @@ my @libs = search_file($file); foreach (@libs) { my ($name, $maj, $min) = $_ =~ /lib([^\/]+)\.so\.(\d+)\.(\d+)$/; + next if ! $name; my $spec = 'l' . $name . '.' . $maj . '.' . $min; if (exists $ld->{$spec}) { @@ -91,6 +92,7 @@ open my $libs, '-|', '/usr/bin/ldd', $file or die "Couldn't open ldd '$file': $!"; while (<$libs>) { + next if length($_) < 56; chomp; my $spec = substr $_, 56; next if $spec !~ m{^/}xms;