ok beck@

On Mon, Jul 16, 2018 at 15:53 Sebastien Marie <sema...@online.fr> wrote:

> Hi,
>
> While reviewing unveil(2) code, I found an incorrect type on
> unvname_new() function: flags argument should be uint64_t.
>
> It is called by unveil_add_name() which uses uint64_t for flags, and
> store the value in struct unvname un_flags member which is uint64_t.
>
> Thanks.
> --
> Sebastien Marie
>
>
> Index: kern/kern_unveil.c
> ===================================================================
> RCS file: /cvs/src/sys/kern/kern_unveil.c,v
> retrieving revision 1.2
> diff -u -p -r1.2 kern_unveil.c
> --- kern/kern_unveil.c  13 Jul 2018 13:47:41 -0000      1.2
> +++ kern/kern_unveil.c  16 Jul 2018 13:08:40 -0000
> @@ -50,7 +50,7 @@ unvname_compare(const struct unvname *n1
>  }
>
>  struct unvname *
> -unvname_new(const char *name, size_t size, int flags)
> +unvname_new(const char *name, size_t size, uint64_t flags)
>  {
>         struct unvname *ret = malloc(sizeof(struct unvname), M_PROC,
> M_WAITOK);
>         ret->un_name = malloc(size, M_PROC, M_WAITOK);
>

Reply via email to