bcachefs: avoid out-of-bounds in split_devs
authorStijn Tintel <stijn@linux-ipv6.be>
Thu, 13 May 2021 20:08:47 +0000 (23:08 +0300)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:03 +0000 (17:09 -0400)
commitffcf9ec78c133fb85ff13d8119ff404e11820834
tree1a6a0d2bd8278b7a1b8f4c37c9b63d5aa48675c6
parent909004d2f9f8d56997010eac3ae975e214ff9d0f
bcachefs: avoid out-of-bounds in split_devs

Calling mount with an empty source string causes an out-of-bounds error
in split_devs. Check the length of the source string to avoid this.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/fs.c