« Previous | Next » 

Revision 2991181a

ID2991181aaa026d8b1444bfaa9c4bcd82065ba5a3

Added by Michael S. Tsirkin about 13 years ago

pci: fix device paths

Patch a6a7005d14b3c32d4864a718fb1cb19c789f58a5 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: Christoph Hellwig <>
Signed-off-by: Michael S. Tsirkin <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences