[prev in list] [next in list] [prev in thread] [next in thread]
List: xen-cvs
Subject: [Xen-changelog] [xen stable-4.3] libxl: Do not generate short block in libxl__datacopier_prefixdata
From: patchbot () xen ! org
Date: 2013-11-27 13:44:13
Message-ID: E1VlfPZ-0005jD-2l () xenbits ! xen ! org
[Download RAW message or body]
commit 841a5a5aca13255e7006e19eb880eaf6df143ac2
Author: Ian Jackson <ian.jackson@eu.citrix.com>
AuthorDate: Tue Sep 3 13:41:46 2013 +0100
Commit: Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Mon Nov 25 13:48:27 2013 +0000
libxl: Do not generate short block in libxl__datacopier_prefixdata
libxl__datacopier_prefixdata would prepend a deliberately short block
(not just a half-full one, but one with a short buffer) to the
dc->bufs queue. However, this is wrong because datacopier_readable
will find it and try to continue to fill it up.
Instead, allocate a full-sized buffer.
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Tested-by: Chunyan Liu <cyliu@suse.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
(cherry picked from commit f6d2a87f051456bddb7a47922c8cf60f37073063)
---
tools/libxl/libxl_aoutils.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tools/libxl/libxl_aoutils.c b/tools/libxl/libxl_aoutils.c
index 983a60a..b4eb6e5 100644
--- a/tools/libxl/libxl_aoutils.c
+++ b/tools/libxl/libxl_aoutils.c
@@ -89,7 +89,7 @@ void libxl__datacopier_prefixdata(libxl__egc *egc, libxl__datacopier_state *dc,
assert(len < dc->maxsz - dc->used);
- buf = libxl__zalloc(NOGC, sizeof(*buf) - sizeof(buf->buf) + len);
+ buf = libxl__zalloc(NOGC, sizeof(*buf));
buf->used = len;
memcpy(buf->buf, data, len);
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.3
_______________________________________________
Xen-changelog mailing list
Xen-changelog@lists.xen.org
http://lists.xensource.com/xen-changelog
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic