Bug#703240: apt: pkgTagSection.Exists sometimes lies about a field being present, .Find does not

2013-03-18 Thread Michael Vogt
On Sun, Mar 17, 2013 at 03:26:33PM +0100, Niels Thykier wrote: Package: apt Version: 0.9.7.8 Severity: normal Thanks for your bugreport and your testcase! [..] Attached is a prototype test case for test/libapt that triggers this flaw. I pushed a fix (that also removes the inline as Julian

Bug#703240: apt: pkgTagSection.Exists sometimes lies about a field being present, .Find does not

2013-03-18 Thread Niels Thykier
On 2013-03-18 12:14, Michael Vogt wrote: On Sun, Mar 17, 2013 at 03:26:33PM +0100, Niels Thykier wrote: Package: apt Version: 0.9.7.8 Severity: normal Thanks for your bugreport and your testcase! [..] You are most welcome, :) Attached is a prototype test case for test/libapt that

Bug#703240: apt: pkgTagSection.Exists sometimes lies about a field being present, .Find does not

2013-03-17 Thread Niels Thykier
Package: apt Version: 0.9.7.8 Severity: normal Hi, There is a flaw in the handling of hash collisions in pkgTagSection's Exists method that makes the Exists method return true even if the Tag (field) is not present. This is visible already in the header file, tagfile.h: /* This very

Bug#703240: apt: pkgTagSection.Exists sometimes lies about a field being present, .Find does not

2013-03-17 Thread Julian Andres Klode
On Sun, Mar 17, 2013 at 03:26:33PM +0100, Niels Thykier wrote: Package: apt Version: 0.9.7.8 Severity: normal Hi, There is a flaw in the handling of hash collisions in pkgTagSection's Exists method that makes the Exists method return true even if the Tag (field) is not present. This