qemu-stable
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-stable] [Qemu-devel] [PATCH for-2.0 25/47] qcow2: Fix backing


From: Max Reitz
Subject: Re: [Qemu-stable] [Qemu-devel] [PATCH for-2.0 25/47] qcow2: Fix backing file name length check
Date: Fri, 28 Mar 2014 23:39:41 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0

On 26.03.2014 13:05, Stefan Hajnoczi wrote:
From: Kevin Wolf <address@hidden>

len could become negative and would pass the check then. Nothing bad
happened because bdrv_pread() happens to return an error for negative
length values, but make variables for sizes unsigned anyway.

This patch also changes the behaviour to error out on invalid lengths
instead of silently truncating it to 1023.

Signed-off-by: Kevin Wolf <address@hidden>
---
  block/qcow2.c              | 9 ++++++---
  tests/qemu-iotests/080     | 8 ++++++++
  tests/qemu-iotests/080.out | 5 +++++
  3 files changed, 19 insertions(+), 3 deletions(-)

Reviewed-by: Max Reitz <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]