On Thu, Oct 29, 2026 at 12:23:56AM +0100, Kevin Wolf wrote:
> The spec requires not only NUL termination of the device ID string, but
> NUL padding:
> 
>     VIRTIO_BLK_T_GET_ID requests fetch the device ID string from the
>     device into data. The device ID string is a NUL-padded ASCII string
>     up to 20 bytes long. If the string is 20 bytes long then there is no
>     NUL terminator.
> 
> Zero out all of the remaining bytes in the request buffer.
> 
> Signed-off-by: Kevin Wolf <[email protected]>
> ---
>  hw/block/virtio-blk.c | 12 ++++++++----
>  1 file changed, 8 insertions(+), 4 deletions(-)

Reviewed-by: Stefan Hajnoczi <[email protected]>

Reply via email to