Re: [PATCH] util/guest-random: Fix size arg to tail memcpy

2021-07-09 Thread Laurent Vivier
Le 09/07/2021 à 14:06, Mark Nelson a écrit : > We know that in the body of this if statement i is less than len, so > we really should be copying len - i bytes not i - len bytes. > > Fix this typo. > > Signed-off-by: Mark Nelson > --- > util/guest-random.c | 2 +- > 1 file changed, 1 insertion(

Re: [PATCH] util/guest-random: Fix size arg to tail memcpy

2021-07-09 Thread Philippe Mathieu-Daudé
On 7/9/21 2:06 PM, Mark Nelson wrote: > We know that in the body of this if statement i is less than len, so > we really should be copying len - i bytes not i - len bytes. > > Fix this typo. > Oops. Fixes: 8d8404f1564 ("util: Add qemu_guest_getrandom and associated routines") Reviewed-by: Phili

Re: [PATCH] util/guest-random: Fix size arg to tail memcpy

2021-07-09 Thread Richard Henderson
On 7/9/21 5:06 AM, Mark Nelson wrote: We know that in the body of this if statement i is less than len, so we really should be copying len - i bytes not i - len bytes. Fix this typo. Signed-off-by: Mark Nelson --- util/guest-random.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Re

[PATCH] util/guest-random: Fix size arg to tail memcpy

2021-07-09 Thread Mark Nelson
We know that in the body of this if statement i is less than len, so we really should be copying len - i bytes not i - len bytes. Fix this typo. Signed-off-by: Mark Nelson --- util/guest-random.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/guest-random.c b/util/gues