]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs_metadump: ignore attr leaf with 0 entries v4.10.0-rc1
authorEric Sandeen <sandeen@redhat.com>
Thu, 16 Feb 2017 03:48:31 +0000 (21:48 -0600)
committerEric Sandeen <sandeen@redhat.com>
Thu, 16 Feb 2017 03:48:31 +0000 (21:48 -0600)
commit595629131dbe6c5fb16d03e87bc2cb71ad3dcc4b
tree5dd0a91721c995fb5878a39a072c3739559a0725
parentce24180de8c4dcb4793bb7bffd3c187720c3d4b7
xfs_metadump: ignore attr leaf with 0 entries

Another in the ongoing saga of attribute leaves with zero
entries; in this case, if we try to metadump an inode with
a zero-entries attribute leaf, the zeroing code will go off
the rails and segfault at:

                memset(&entries[nentries], 0,
                       first_name - (char *)&entries[nentries]);

because first_name is null, and we try to memset a large
(negative) number.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
db/metadump.c