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

Re: [Xen-devel] [PATCH] xenalyze: Use correct length when copying record into buffer



On Tue, Oct 9, 2012 at 6:46 PM, Boris Ostrovsky <boris.ostrovsky@xxxxxxx> wrote:
> # HG changeset patch
> # User Boris Ostrovsky <boris.ostrovsky@xxxxxxx>
> # 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@xxxxxxx>

Good catch!  Thanks.  BTW, somehow this ended up with word-wrap and
whitespace damage -- I've fixed it and applied it anyway, but next
time can you try to use the mercurial patchbomb extension (hg email)?
(Making it an attachment is OK too, but setting up patchbomb is
definitely worth the effort.)

Thanks,
 -George

>
> 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*/
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxx
> http://lists.xen.org/xen-devel

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.