Package: diffoscope
Version: 51
Severity: normal

I found a way to crash diffoscope with broken symlinks:

pabs@chianamo ~ $ mkdir foo bar 
pabs@chianamo ~ $ touch foo/baz
pabs@chianamo ~ $ ln -s asdasfahguwbagpiuasbdifgsabdf bar/baz
pabs@chianamo ~ $ diffoscope foo bar
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/diffoscope/", line 177, in 
  File "/usr/lib/python3/dist-packages/diffoscope/", line 148, in 
    parsed_args.file1, parsed_args.file2)
  File "/usr/lib/python3/dist-packages/diffoscope/comparators/", 
line 92, in compare_root_paths
    return compare_directories(path1, path2)
  File "/usr/lib/python3/dist-packages/diffoscope/comparators/", 
line 104, in compare_directories
    return FilesystemDirectory(path1).compare(FilesystemDirectory(path2))
  File "/usr/lib/python3/dist-packages/diffoscope/comparators/", 
line 157, in compare
    my_file, other_file, source=name)
  File "/usr/lib/python3/dist-packages/diffoscope/comparators/", 
line 102, in compare_files
    if file1.has_same_content_as(file2):
  File "/usr/lib/python3/dist-packages/diffoscope/", line 143, in 
    return original_function(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/diffoscope/comparators/", line 
186, in has_same_content_as
    other_size = os.path.getsize(other.path)
  File "/usr/lib/python3.5/", line 50, in getsize
    return os.stat(filename).st_size
FileNotFoundError: [Errno 2] No such file or directory: 'bar/baz'

-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (900, 'testing'), (860, 'testing-proposed-updates'), (850, 
'buildd-testing-proposed-updates'), (800, 'unstable'), (790, 
'buildd-unstable'), (700, 'experimental'), (690, 'buildd-experimental'), (500, 
'unstable-debug'), (1, 'experimental-debug')
Architecture: amd64 (x86_64)

Kernel: Linux 4.4.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_AU.utf8, LC_CTYPE=en_AU.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages diffoscope depends on:
ii  python3-libarchive-c   2.1-3
ii  python3-magic          1:5.25-2
ii  python3-pkg-resources  18.8-1
pn  python3:any            <none>

Versions of packages diffoscope recommends:
ii  acl                     2.2.52-3
ii  binutils-multiarch      2.26-5
ii  bzip2                   1.0.6-8
ii  caca-utils              0.99.beta19-2+b1
ii  colord                  1.2.12-1
ii  cpio                    2.11+dfsg-5
pn  default-jdk | java-sdk  <none>
ii  enjarify                20151118-1
ii  fontforge-extras        0.3-4
pn  fp-utils                <none>
ii  genisoimage             9:1.1.11-3
ii  gettext                 0.19.7-2
ii  ghc                     7.10.3-7
ii  ghostscript             9.18~dfsg-4
ii  gnupg                   1.4.20-4
pn  mono-utils              <none>
ii  pdftk                   2.02-3
ii  poppler-utils           0.38.0-2
ii  python3-debian          0.1.27
pn  python3-guestfs         <none>
ii  python3-rpm   
ii  python3-tlsh            3.4.4+20151206-1+b1
ii  rpm2cpio      
ii  sng                     1.1.0-1
ii  sqlite3                 3.11.1-1
ii  squashfs-tools          1:4.3-3
ii  unzip                   6.0-20
ii  vim-common              2:7.4.963-1+b2
ii  xz-utils                5.1.1alpha+20120614-2.1

Versions of packages diffoscope suggests:
ii  libjs-jquery  1.11.3+dfsg-4

-- no debconf information


Attachment: signature.asc
Description: This is a digitally signed message part

Reproducible-builds mailing list

Reply via email to