On 2014-11-07 at 20:39, Kevin Wolf wrote:
From: Markus Armbruster <arm...@redhat.com>

Signed-off-by: Markus Armbruster <arm...@redhat.com>
Signed-off-by: Kevin Wolf <kw...@redhat.com>
---
  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 <mre...@redhat.com>

Reply via email to