On Wed, Feb 22, 2012 at 03:04:56PM -0800, John Johansen wrote:
> +static char *handle_features_dir(const char *filename, char **buffer, int 
> size,
> +                              char *pos)
> [...]
> +             flags_string = malloc(1024);
> +             handle_features_dir(FLAGS_FILE, &flags_string, 2048, 
> flags_string);

Shouldn't that 1024 be 2048, or vice versa?

> +             if (strstr(flags_string, "network"))
> +                     kernel_supports_network = 1;
> +             if (strstr(flags_string, "mount"))
> +                     kernel_supports_mount = 1;

Looks like you were going for a more complex flags_string in the function,
but then just did a quick check for things here instead?

-Kees

-- 
Kees Cook

-- 
AppArmor mailing list
AppArmor@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/apparmor

Reply via email to