All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xenalyze: Use correct length when copying record into buffer
@ 2012-10-09 17:46 Boris Ostrovsky
  2012-10-10 13:34 ` George Dunlap
  0 siblings, 1 reply; 2+ messages in thread
From: Boris Ostrovsky @ 2012-10-09 17:46 UTC (permalink / raw)
  To: George.Dunlap; +Cc: xen-devel

# HG changeset patch
# User Boris Ostrovsky <boris.ostrovsky@amd.com>
# 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 <boris.ostrovsky@amd.com>

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*/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-10-10 13:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-09 17:46 [PATCH] xenalyze: Use correct length when copying record into buffer Boris Ostrovsky
2012-10-10 13:34 ` George Dunlap

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.