svn commit: r318210 - head/contrib/netbsd-tests/lib/libc/ssp
Ngie Cooper
ngie at FreeBSD.org
Fri May 12 05:06:49 UTC 2017
Author: ngie
Date: Fri May 12 05:06:48 2017
New Revision: 318210
URL: https://svnweb.freebsd.org/changeset/base/318210
Log:
ssp_test:read:: query the value of MAXPATHLEN via getconf(1)
In the event the value of PATH_MAX was changed, the assumption that
MAXPATHLEN is 1024 (and hence the buffer length required to trigger
SSP to fail for read(2)) would be invalidated. Query getconf(1) for
the actual value of MAXPATHLEN via _XOPEN_PATH_MAX instead, and
increment the value by 1 to ensure that the SSP support tests the
stack smashing support properly.
MFC after: 3 weeks
Sponsored by: Dell EMC Isilon
Modified:
head/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh
Modified: head/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh Fri May 12 04:10:02 2017 (r318209)
+++ head/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh Fri May 12 05:06:48 2017 (r318210)
@@ -392,7 +392,8 @@ read_body()
h_fail "$prog 1027" "echo bar |"
else
# End FreeBSD
- h_fail "$prog 1025" "echo bar |"
+ MAX_PATH=$(getconf _XOPEN_MAX_PATH) || atf_fail "getconf failed"
+ h_fail "$prog $(( $MAX_PATH + 1))" "echo bar |"
# Begin FreeBSD
fi
# End FreeBSD
More information about the svn-src-head
mailing list