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

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

 



Signed-off-by: Jakub Wilk <jwilk@xxxxxxxxx>
---
 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
-- 
2.17.0

--
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