Skip to content
Commit 22515881 authored by Shigeru Yoshida's avatar Shigeru Yoshida Committed by Christian Brauner
Browse files

reiserfs: Replace 1-element array with C99 style flex-array



UBSAN found the following issue:

================================================================================
UBSAN: array-index-out-of-bounds in fs/reiserfs/journal.c:4166:22
index 1 is out of range for type '__le32 [1]'

This is because struct reiserfs_journal_desc uses 1-element array for
dynamically sized array member, j_realblock.

This patch fixes this issue by replacing the 1-element array member with C99
style flex-array.  This patch also fixes the same issue in struct
reiserfs_journal_commit as the same manner.

Fixes: f466c6fd ("move private bits of reiserfs_fs.h to fs/reiserfs/reiserfs.h")
Signed-off-by: default avatarShigeru Yoshida <syoshida@redhat.com>
Message-Id: <20230821043312.1444068-1-syoshida@redhat.com>
Signed-off-by: default avatarChristian Brauner <brauner@kernel.org>
parent 0bb80ecc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment