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

Bug#151987: apt incorrectly parses filename, size, and md5sum fields



Package: apt
Version: apt 0.5.4 for linux i386 compiled on Aug 19 2001 01:02:26

I was reading the dpkg source(attempting to optimize it), and noticed that
f_filecharf fields(filename, size, md5sum, msdos-filename) allow for multiple
values.  Each field must have the same number of values(ie, all only have a
single value, or all only have 3 values, etc).  dpkg correctly handles this
case.  apt does not.

I editted the packages file after download, to simulate this problem.

--
yakko:/tmp/t/usr/share/doc/dpkg-iasearch# grep-dctrl -F Package -s Filename,Size,MD5Sum 3270-common /var/lib/apt/lists/saens.debian.org_debian_dists_woody_non-free_binary-i386_Packages
Filename: pool/non-free/3/3270/3270-common_3.2.17-2_i386.deb
 pool/non-free/3/3270/3270-common_3.2.17-2_i386.deb
Size: 30040
 30040
MD5Sum: 0c37d1d2d60017dd6985b766d5cc85d0
 0c37d1d2d60017dd6985b766d5cc85d0
yakko:/tmp/t/usr/share/doc/dpkg-iasearch# touch /var/lib/apt/lists/saens.debian.org_debian_dists_woody_non-free_binary-i386_Packages
yakko:/tmp/t/usr/share/doc/dpkg-iasearch# apt-get update
Hit http://people.debian.org sid/i386/ Packages
..
Hit ftp://ftp.uk.linux.org woody/non-free Release
Reading Package Lists... Done
Building Dependency Tree... Done
yakko:/tmp/t/usr/share/doc/dpkg-iasearch# apt-get install 3270-common
Reading Package Lists... Done
Building Dependency Tree... Done
The following NEW packages will be installed:
  3270-common
0 packages upgraded, 1 newly installed, 0 to remove and 43  not upgraded.
Need to get 30.0kB of archives. After unpacking 131kB will be used.
E: Method gave invalid 200 URI Start message
E: Tried to dequeue a fetching object
--

If you don't support this, then abort when you parse the file, and not later
on when the package is fetched.  Otherwise, you need to support this format.




-- 
To UNSUBSCRIBE, email to deity-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: