]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
libxfs: Fix attr leaf block definition
authorJan Kara <jack@suse.com>
Tue, 18 Aug 2015 07:53:17 +0000 (17:53 +1000)
committerDave Chinner <david@fromorbit.com>
Tue, 18 Aug 2015 07:53:17 +0000 (17:53 +1000)
commit28c1c279378cd85fc177f071e3550c0e8aba0538
treef6c5c88978c8982eaec9028e276b7b58c1057aac
parentb990de8ba4e2df2bc76a140799d3ddb4a0eac4ce
libxfs: Fix attr leaf block definition

struct xfs_attr_leafblock contains 'entries' array which is declared
with size 1 altough it can in fact contain much more entries. Since this
array is followed by further struct members, gcc (at least in version
4.8.3) thinks that the array has the fixed size of 1 element and thus
optimizes away all accesses beyond the end of array resulting in
non-working code. In particular this problem was seen with
xfsprogs-3.1.8.

Signed-off-by: Jan Kara <jack@suse.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
libxfs/xfs_da_format.h