Whamcloud - gitweb
LU-2241 symlink: fix off-by-one error when reading symlinks
authorNathaniel Clark <nathaniel.l.clark@intel.com>
Wed, 31 Oct 2012 20:56:09 +0000 (16:56 -0400)
committerOleg Drokin <green@whamcloud.com>
Tue, 6 Nov 2012 16:17:03 +0000 (11:17 -0500)
commit6c3606b79a4c25946255a680f79ff2d58df66bbc
treee1f5d325f8d84b28962ca3fd6040b141445cf5b0
parentb58a81067237f398f735f85b2211431cfc37493a
LU-2241 symlink: fix off-by-one error when reading symlinks

This fixes and off-by-one error when reading symlinks of inode size.
The null character is not accounted for when checking bufferlength
vs. inode data size.

Also add regression test to sanity.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: If4464cac60d57012311226113ff38b9c28926958
Reviewed-on: http://review.whamcloud.com/4415
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/osd-ldiskfs/osd_io.c
lustre/tests/sanity.sh