Re: Bug#574956: dpkg drops zero-epoch in status file
Florian Weimer <firstname.lastname@example.org> writes:
> * Integer overflow in epoch handling
> (i386)$ dpkg --compare-versions 4294967296:1 '>>' 4294967295:1 ; echo $?
> (amd64)$ dpkg --compare-versions 4294967296:1 '>>' 4294967295:1 ; echo $?
Well, this is wrong if one is to take the wording of policy to mean a C
type. An "unsigned integer" has the same size on i386 and amd64.
> The problem is that the size of long is archtecture-specific, and that
> there is no proper error handling. apt is not affected by this.
> This appears to be a dpkg bug, filed as #580038.
An epoch is defined as
This is a single (generally small) unsigned integer. It may be
omitted, in which case zero is assumed. If it is omitted then the
upstream_version may not contain any colons.
Lets remove the "generally" from policy so we can truely declare this
case as insane.