[apparmor] [PATCH 2/5] Add the ability to read proc attr interfaces
John Johansen
john.johansen at canonical.com
Fri Jul 22 03:43:16 UTC 2011
On 07/21/2011 06:57 PM, Kees Cook wrote:
> Hi John,
>
> On Thu, Jul 21, 2011 at 11:16:35AM -0700, John Johansen wrote:
>> +int aa_getprocattr(pid_t tid, const char *attr, char **buf, char **mode)
>> +{
>> + int rc, size = INITIAL_GUESS_SIZE/2;
>> + char *buffer = NULL;
>
> How about doing a buf!=NULL test here just to be extra defensive?
>
sure we can throw in
if (!buf) {
errno = EINVAL;
return -1;
}
More information about the AppArmor
mailing list