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