libmultipath: format_devname: avoid buffer overflow