[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#521257: Use of uninitialized value in bitwise or (|) at /usr/share/lintian/lib/Lintian/Command.pm line 308.



Michael Tautschnig <mt@debian.org> writes:

> I've just checked and I think both the file one can download from the
> bugreport and my local copy here _do_ have a newline, but my methods for
> checking that might not be as effective. Anyway, I've attached a freshly
> generated index file, this time gzipped to make sure my mail agent
> doesnt harm it and I've also BCC'ed Russ to avoid any extra loops.

Yup.  There's a trailing newline -- that wasn't the problem.

I'm a little disturbed by the degree to which the spacing indentation
changes in your index.  That in and of itself shouldn't cause Lintian any
problems, but I don't understand why it's happening.  It doesn't do this
for me when I run tar -tvf on a source tarball, and the manipulations that
Lintian does shouldn't change the spacing of the columns.  I'm not sure if
that's perhaps a sign of some other issue or just nothing.

I *think* I might have fixed your problem, though.  Could you try the
following patch against your /usr/share/lintian directory and see if it
makes the problem go away?  (Although if this did fix it, I don't know why
the problem wasn't reproducible.)

--- a/unpack/unpack-srcpkg-l1
+++ b/unpack/unpack-srcpkg-l1
@@ -126,7 +126,7 @@ my $prefix;
 for my $line (@index) {
     my ($file) = ($line =~ /^(?:\S+\s+){5}(.*)/);
     $file =~ s,^\./+,,;
-    my ($dir) = ($file =~ m,([^/]+),);
+    my ($dir) = ($file =~ m,^([^/]+),);
     if (defined($dir) and $dir eq $file and not $line =~ /^d/) {
         $prefix = '';
     } elsif (defined $dir) {
@@ -141,7 +141,7 @@ for my $line (@index) {
 }
 if ($prefix) {
     @index = map {
-        s,^((?:\S+\s+){5})(?:\./+)?\Q$prefix\E(?:/+|\z),$1,;
+        s,^((?:\S+\s+){5})(?:\./+)?\Q$prefix\E(?:/+|\Z),$1,;
         if (/^(?:\S+\s+){5}\S+/) {
             $_;
         } else {

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>



Reply to: