[apparmor] [PATCH] Fix transition table resize padding

Kees Cook kees.cook at canonical.com
Tue Jul 13 15:36:59 BST 2010


On Tue, Jul 13, 2010 at 07:23:32AM -0700, John Johansen wrote:
> The 256 is because in the !x case the whole range of the character
> falls outside the current table hence we need 256 more entries to cover
> the full range.
> 
> The 255 in the x case is because the x fits in.  We then use that to
> figure what how much we overflow by.  We could change the math to
> 256 - 1 to be explicit but I would prefer just keeping 255 and adding
> a comment to each case

Works for me.

-- 
Kees Cook
Ubuntu Security Team



More information about the AppArmor mailing list