From: Boris Ostrovsky Subject: [PATCH] xenalyze: Use correct length when copying record into buffer Date: Tue, 9 Oct 2012 13:46:21 -0400 Message-ID: <507462ED.2000203@amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: George.Dunlap@eu.citrix.com Cc: xen-devel List-Id: xen-devel@lists.xenproject.org # HG changeset patch # User Boris Ostrovsky # Date 1349350810 14400 # Node ID ba18ab77da8ebe3c81ebf2c78c735cfcd40ea031 # Parent 4d47a8934b40556dd98428361c482be419c643be xenalyze: Use correct length when copying record into buffer mread64() calculates number of bytes to copied to avoid overrunning target buffer but then doesn't use the calculated value. Signed-off-by: Boris Ostrovsky diff -r 4d47a8934b40 -r ba18ab77da8e mread.c --- a/mread.c Wed Jun 20 16:54:17 2012 +0100 +++ b/mread.c Thu Oct 04 07:40:10 2012 -0400 @@ -143,7 +143,7 @@ copy: dprintf(warn, " Using index %d, buffer at %p, buffer offset %llx len %d\n", bind, b, boffset, bsize); - bcopy(b+boffset, rec, len); + bcopy(b+boffset, rec, bsize); /* Handle the boundary case; make sure this is after doing anything * with the static variables*/