]> www.infradead.org Git - users/willy/xarray.git/commit
bcachefs: Fix array-index-out-of-bounds
authorKent Overstreet <kent.overstreet@linux.dev>
Wed, 12 Jun 2024 23:51:15 +0000 (19:51 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Wed, 19 Jun 2024 22:27:23 +0000 (18:27 -0400)
commitd47df4f616d523b4ef832d03ec28b2e6d838067b
tree9765c12aaf7cf67f02958f8822d4f686c850bce7
parentf770a6e9a3d7a90f77863b51325614f37a57fef5
bcachefs: Fix array-index-out-of-bounds

We use 0 size arrays as markers, but ubsan doesn't know that - cast them
to a pointer to fix the splat.

Also, make sure this code gets tested a bit more.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/bkey.c
fs/bcachefs/bkey_methods.c
fs/bcachefs/bkey_methods.h