]> git.ipfire.org Git - thirdparty/mdadm.git/commit
mdadm: sysfs.c fix coverity issues
authorNigel Croxon <ncroxon@redhat.com>
Thu, 18 Jul 2024 17:05:57 +0000 (13:05 -0400)
committerMariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
Tue, 13 Aug 2024 11:50:55 +0000 (13:50 +0200)
commit18eaf6c5206a37ad059c930d1ee2dbc9b7297513
treee125fa516ddc40a26f081a2350587bf30365b4a5
parentea076e7c4bc8b3122ad9d7131098c4b85902a299
mdadm: sysfs.c fix coverity issues

Fixing the following coding errors the coverity tools found:

* Event fixed_size_dest: You might overrun the 32-character
fixed-size string "mdi->sys_name" by copying "devnm" without
checking the length

* Event fixed_size_dest: You might overrun the 50-character
fixed-size string "sra->text_version" by copying "buf + 9"
without checking the length.

* Event string_overflow: You might overrun the 32-character
destination string "dev->sys_name" by writing 256 characters
from "de->d_name".

Signed-off-by: Nigel Croxon <ncroxon@redhat.com>
sysfs.c