pci: fix device paths
Patch a6a7005d generated broken device paths. We snprintf with a length shorter than the output, so the last character is discarded and replaced by the null byte. Fix it up by snprintf to a buffer which is larger by 1 byte and then memcpy the data (without the null byte) to where we need it. Reported-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
Showing
想要评论请 注册 或 登录