Re: [PATCH] open.2: Add missing argument for snprintf

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/26/2018 11:37 PM, Jakub Wilk wrote:
> Signed-off-by: Jakub Wilk <jwilk@xxxxxxxxx>

Thanks, Jakub. Applied.

Cheers,

Michael


> ---
>  man2/open.2 | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/man2/open.2 b/man2/open.2
> index 858eb2660..f8449d1e5 100644
> --- a/man2/open.2
> +++ b/man2/open.2
> @@ -730,7 +730,7 @@ with steps something like the following:
>  .EX
>  char buf[PATH_MAX];
>  fd = open("some_prog", O_PATH);
> -snprintf(buf, "/proc/self/fd/%d", fd);
> +snprintf(buf, PATH_MAX, "/proc/self/fd/%d", fd);
>  execl(buf, "some_prog", (char *) NULL);
>  .EE
>  .in
> 


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux