On Thu, May 14, 2015 at 01:01:33AM -0500, Tyler Hicks wrote:
> > Is this size++ now incorrect? (I was going to suggest it be deleted
> > because it isn't used further in this patch, but size is used as the
> > return value for the function. Perhaps the return value should also be
> > amended to (nul - buf)?)
> 
> The size++ is still correct. The aa_getcon(2) family of functions
> includes any NUL bytes in their return values:
> 
>   RETURN VALUE
>        On success size of data placed in the buffer is returned, this includes
>        the mode if present and any terminating characters. On error, -1 is
>        returned, and errno(3) is set appropriately.
> 
> This patch only changes the size passed into parse_confinement_mode(). The
> return value of aa_getprocattr_raw() intentionally still counts the NUL bytes
> read into buf.

Okay, then...

Acked-by: Seth Arnold <[email protected]>

Thanks

Attachment: signature.asc
Description: Digital signature

-- 
AppArmor mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/apparmor

Reply via email to