md_monitor: Avoid overflow in device node name

The device node name is stored in a fixed buffer, which
might be shorter than the node name from udev.

Signed-off-by: Hannes Reinecke <hare@suse.de>
md_monitor: Avoid buffer overflow in add_component()

add_component() will copy the md_name argument into a fixed
buffer, so we need to check the size of the argument to avoid
buffer overflows.

Signed-off-by: Hannes Reinecke <hare@suse.de>