« Previous | Next » 

Revision cf070d7e

IDcf070d7ec0b8fb21faa9a630ed5cc66f90844a08

Added by Christoph Hellwig almost 15 years ago

qemu-io: reject invalid pattern

Replace the use of atoi which is used for pattern parsing currently with
strtol. Atoi won't parse sedecimal pattern values (it always returns 0),
but qemu-iotests use such pattern values. Also reject every pattern
that is not a unsigned char as we pass the pattern to memset which
expect a bye value (despite having the pattern argument declared as int).

Based on an earlier patch by Stefan Weil which did not include the
error handling.

Signed-off-by: Christoph Hellwig <>
Reported-by: Stefan Weil <>
Signed-off-by: Anthony Liguori <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences