freebsd-dev/cmd/ztest
Brian Behlendorf ae380cfa76 Realpath arg 2 must be a minimum of PATH_MAX
The realpath(3) function expects that when a buffer is passed
for the 'resolved_path' that it be at least PATH_MAX in length.
If it's not a buffer overflow may occur.

Therefore the passed buffer size is changed from MAXNAMELEN to
MAXPATHLEN.  We also take this opertunity to dynamically allocate
the buffer to keep it off the stack.

  warning: call to '__realpath_chk_warn' declared with attribute
  warning: second argument of realpath must be either NULL or at
  least PATH_MAX bytes long buffer [enabled by default]

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
2012-10-04 13:19:10 -07:00
..
.gitignore Add .gitignore files to exclude build products 2010-01-08 11:35:17 -08:00
Makefile.am Combine libraries: spl, avl, efi, share, unicode. 2012-01-17 15:19:50 -08:00
ztest.c Realpath arg 2 must be a minimum of PATH_MAX 2012-10-04 13:19:10 -07:00