Bug#877473: diffoscope: crashes on malformed fonts-humor-sans_1.0-2_all.deb: IndexError: string index out of range
Andreas Beckmann
anbe at debian.org
Mon Oct 2 04:30:03 UTC 2017
Package: diffoscope
Version: 78
Severity: important
$ debsnap -d . -a all fonts-humor-sans 1.0-1
$ debsnap -d . -a all fonts-humor-sans 1.0-2
$ diffoscope fonts-humor-sans_1.0-1_all.deb fonts-humor-sans_1.0-2_all.deb
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/diffoscope/main.py", line 412, in main
sys.exit(run_diffoscope(parsed_args))
File "/usr/lib/python3/dist-packages/diffoscope/main.py", line 384, in run_diffoscope
difference = compare_root_paths(path1, path2)
File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils/compare.py", line 65, in compare_root_paths
return compare_files(file1, file2)
File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils/compare.py", line 104, in compare_files
return file1.compare(file2, source)
File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils/file.py", line 351, in compare
difference = self._compare_using_details(other, source)
File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils/file.py", line 306, in _compare_using_details
details.extend(self.as_container.compare(other.as_container, no_recurse=no_recurse))
File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils/container.py", line 169, in compare_pair
difference = compare_files(file1, file2, source=None, diff_content_only=no_recurse)
File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils/compare.py", line 104, in compare_files
return file1.compare(file2, source)
File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils/file.py", line 351, in compare
difference = self._compare_using_details(other, source)
File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils/file.py", line 306, in _compare_using_details
details.extend(self.as_container.compare(other.as_container, no_recurse=no_recurse))
File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils/container.py", line 169, in compare_pair
difference = compare_files(file1, file2, source=None, diff_content_only=no_recurse)
File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils/compare.py", line 104, in compare_files
return file1.compare(file2, source)
File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils/file.py", line 351, in compare
difference = self._compare_using_details(other, source)
File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils/file.py", line 306, in _compare_using_details
details.extend(self.as_container.compare(other.as_container, no_recurse=no_recurse))
File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils/container.py", line 169, in compare_pair
difference = compare_files(file1, file2, source=None, diff_content_only=no_recurse)
File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils/compare.py", line 104, in compare_files
return file1.compare(file2, source)
File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils/file.py", line 351, in compare
difference = self._compare_using_details(other, source)
File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils/file.py", line 297, in _compare_using_details
details.extend(self.compare_details(other, source))
File "/usr/lib/python3/dist-packages/diffoscope/comparators/deb.py", line 157, in compare_details
self.path, other.path, source="line order")]
File "/usr/lib/python3/dist-packages/diffoscope/difference.py", line 224, in from_text_readers
**kwargs
File "/usr/lib/python3/dist-packages/diffoscope/difference.py", line 182, in from_feeder
unified_diff = diff(feeder1, feeder2)
File "/usr/lib/python3/dist-packages/diffoscope/diff.py", line 252, in diff
return run_diff(fifo1_path, fifo2_path, fifo1.end_nl_q, fifo2.end_nl_q)
File "/usr/lib/python3/dist-packages/diffoscope/diff.py", line 209, in __exit__
self.join()
File "/usr/lib/python3/dist-packages/diffoscope/diff.py", line 242, in join
raise self._exception
File "/usr/lib/python3/dist-packages/diffoscope/diff.py", line 233, in run
end_nl = self.feeder(fifo)
File "/usr/lib/python3/dist-packages/diffoscope/feeders.py", line 58, in feeder
end_nl = buf[-1] == '\n'
IndexError: string index out of range
I noticed this in a stretch(+ some buster) system, and verified it in a sid chroot
(the traceback is from sid).
fonts-humor-sans_1.0-2_all.deb seems to have a malformed md5sums file
(at least a piuparts helper script failed to parse it.)
Andreas
More information about the Reproducible-builds
mailing list