From: Theodore Ts'o Date: Wed, 27 Jan 2021 21:41:05 +0000 (-0500) Subject: e2fsck: declare the size of bh->b_data to be 4096 in jfs_user.h X-Git-Tag: v1.45.7~16 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=865221f5aa31bfed1cc06da5815399c9d6c7ef90;p=tools%2Fe2fsprogs.git e2fsck: declare the size of bh->b_data to be 4096 in jfs_user.h When allocating buffer_heads in e2fsck and debugfs the actual size of the memory which is requested is based on the file system block size. So the actual size of b_data in struct buffer_head doesn't actually matter, except that it can triggers a UBSAN error when running the e2fsck regression test. So change it to be 4096 to avoid this false positive. Signed-off-by: Theodore Ts'o --- diff --git a/e2fsck/jfs_user.h b/e2fsck/jfs_user.h index a1c6951..f073355 100644 --- a/e2fsck/jfs_user.h +++ b/e2fsck/jfs_user.h @@ -51,7 +51,7 @@ struct buffer_head { unsigned int b_dirty:1; unsigned int b_uptodate:1; unsigned long long b_blocknr; - char b_data[1024]; + char b_data[4096]; }; struct inode {