Tomohiro Kusumi f0ce0436aa Correct snprintf() size argument
The size argument of snprintf(3) in glibc and snprintf() in Linux
kernel includes trailing \0, as snprintf(3) man page explains it as
"write at most size bytes (including the trailing null byte ('\0'))",
i.e. snprintf() can just take buffer size.

e.g. For snprintf() in module/zfs/zfs_ctldir.c, a buffer size is
MAXPATHLEN, and a caller is passing MAXPATHLEN to snprintf(), so size
should just be `path_len` to do what the caller is trying to do.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Richard Laager <rlaager@wiktel.com>
Signed-off-by: Tomohiro Kusumi <kusumi.tomohiro@gmail.com>
Closes #8692
2019-04-30 19:41:12 -07:00
..
2018-05-29 16:00:33 -07:00
2018-02-07 11:49:38 -08:00
2018-02-07 11:49:38 -08:00
2019-04-30 19:41:12 -07:00
2018-05-29 16:00:33 -07:00
2018-02-07 11:49:38 -08:00
2018-02-07 11:49:38 -08:00
2018-05-29 16:00:33 -07:00
2018-02-24 10:05:37 -08:00
2017-10-30 11:16:56 -07:00
2018-05-29 16:00:33 -07:00

The Solaris Porting Layer, SPL, is a Linux kernel module which provides a compatibility layer used by the ZFS on Linux project.

Installation

The latest version of the SPL is maintained as part of this repository. Only when building ZFS version 0.7.x or earlier must an external SPL release be used. These releases can be found at:

Release

The SPL is released under a GPLv2 license.
For more details see the NOTICE and THIRDPARTYLICENSE files; UCRL-CODE-235197