xfs: check that dir block entries don't off the end of the buffer
authorDarrick J. Wong <darrick.wong@oracle.com>
Fri, 21 Jul 2017 18:04:23 +0000 (11:04 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Tue, 25 Jul 2017 15:36:35 +0000 (08:36 -0700)
commitc0a8582e45a486ad3a29cabaac845191e9c5707c
treed241509c5fdb94dc2218bffff11f98b4c2056483
parent81015427814f0e18c81deedeb27ca41db2361d64
xfs: check that dir block entries don't off the end of the buffer

When we're checking the entries in a directory buffer, make sure that
the entry length doesn't push us off the end of the buffer.  Found via
xfs/388 writing ones to the length fields.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
fs/xfs/libxfs/xfs_dir2_data.c