qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 5/9] block: Factor bdrv_probe_all() out of fi


From: Max Reitz
Subject: Re: [Qemu-devel] [PATCH v2 5/9] block: Factor bdrv_probe_all() out of find_image_format()
Date: Mon, 10 Nov 2014 15:47:43 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

On 2014-11-07 at 20:39, Kevin Wolf wrote:
From: Markus Armbruster <address@hidden>

Signed-off-by: Markus Armbruster <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
  block.c | 45 ++++++++++++++++++++++++++++++++-------------
  1 file changed, 32 insertions(+), 13 deletions(-)

diff --git a/block.c b/block.c
index 4b5735c..2fdc33f 100644
--- a/block.c
+++ b/block.c
@@ -648,11 +648,40 @@ BlockDriver *bdrv_find_protocol(const char *filename,
      return NULL;
  }
+/*
+ * Guess image format by probing its contents.
+ * This is not a good idea when your image is raw (CVE-2008-2004), but
+ * we do it anyway for backward compatibility.
+ * @buf contains the image's first @buf_size bytes.
+ * @buf_size is 2048 or the image's size, whatever is smaller.

That is a funny parameter description. You should fix it in patch 6 (or directly here).

Anyway, as for this patch (or with the comment saying "@buf_size should be at least 512" or something like that):

Reviewed-by: Max Reitz <address@hidden>



reply via email to

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