Package: perforate
Version: 1.2-3
Followup-For: Bug #356515

TEST-CASE:

$ mkdir test
$ cd test
$ date > 1
$ cp 1 2
$ finddup --verbose | tee DUPS
29 './1' './2'
$ nodup --link --verbose --noaction < DUPS
Use of uninitialized value in concatenation (.) or string at /usr/bin/nodup 
line 84, <> line1.
L�ge: 29 Files:

$ ls -gGi 1 2
38008 -rw-rw-r-- 1 29 2006-08-16 10:22 1
38012 -rw-rw-r-- 1 29 2006-08-16 10:22 2
$ finddup --link
$ ls -gGi 1 2
38008 -rw-rw-r-- 2 29 2006-08-16 10:22 1
38008 -rw-rw-r-- 2 29 2006-08-16 10:22 2

ANALYSIS:

When reading files from stdin, the constructed hash-of-arrays is missing
the $mode, $uid, $gid information, so $md5list->[0]->[4] to references
the $size element is outside the array.

PATCH:

--- /usr/bin/finddup~   2006-07-30 02:05:06.000000000 +0200
+++ /usr/bin/finddup    2006-08-16 10:25:49.060496000 +0200
@@ -49,7 +49,7 @@
       my $size = $1;
       s/'$//;
       my @files = split(/' '/);
-      $md5list{$md5++} = [[$size, [EMAIL PROTECTED];
+      $md5list{$md5++} = [[$size, 0, 0, 0, [EMAIL PROTECTED];
    } # while (<>)
 } # if ($opt->{oldresult})
 else

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (989, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.17.8-laptop
Locale: LANG=de_DE.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages perforate depends on:
ii  libc6                         2.3.6-19   GNU C Library: Shared libraries

perforate recommends no packages.

-- no debconf information

Reply via email to