|
| From: | Anthony Liguori |
| Subject: | Re: [Qemu-devel] [PATCH] qemu-img: Fix segfault during rebase |
| Date: | Fri, 19 Feb 2010 16:01:33 -0600 |
| User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091209 Fedora/3.0-4.fc12 Lightning/1.0pre Thunderbird/3.0 |
On 02/17/2010 05:32 AM, Kevin Wolf wrote:
This fixes a possible read beyond the end of the temporary buffers used for comparing data in the old and the new backing file. Signed-off-by: Kevin Wolf<address@hidden>
Applied. Thanks. Regards, Anthony Liguori
---
qemu-img.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/qemu-img.c b/qemu-img.c
index 250d892..258dc62 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -1225,7 +1225,7 @@ static int img_rebase(int argc, char **argv)
int pnum;
if (compare_sectors(buf_old + written * 512,
- buf_new + written * 512, n,&pnum))
+ buf_new + written * 512, n - written,&pnum))
{
ret = bdrv_write(bs, sector + written,
buf_old + written * 512, pnum);
| [Prev in Thread] | Current Thread | [Next in Thread] |