qemu-trivial
[Top][All Lists]
Advanced

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

Re: [PATCH] linux-user/mmap.c: fix integer underflow in target_mremap


From: Jonathan Marler
Subject: Re: [PATCH] linux-user/mmap.c: fix integer underflow in target_mremap
Date: Sat, 2 May 2020 10:13:29 -0600

Yes the first patch was incorrect.  The second patch should be the correct one.

Thanks for the guidance.  I have created a new patch with a "Fixes: ..." and a description of the fix, and have sent that patch to address@hidden

On Sat, May 2, 2020 at 2:38 AM Laurent Vivier <address@hidden> wrote:
Hi,

does this patch replace your previous one?

Please add more details in the description, as you did in the launchpad bug.

You can also add:
Fixes: https://bugs.launchpad.net/bugs/1876373

You must also send the patch to address@hidden

Thanks,
Laurent

Le 02/05/2020 à 09:49, Jonathan Marler a écrit :
> Signed-off-by: Jonathan Marler <address@hidden>
> ---
>  linux-user/mmap.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/linux-user/mmap.c b/linux-user/mmap.c
> index e378033797..caab62909e 100644
> --- a/linux-user/mmap.c
> +++ b/linux-user/mmap.c
> @@ -708,7 +708,7 @@ abi_long target_mremap(abi_ulong old_addr, abi_ulong old_size,
>          if (prot == 0) {
>              host_addr = mremap(g2h(old_addr), old_size, new_size, flags);
>              if (host_addr != MAP_FAILED && reserved_va && old_size > new_size) {
> -                mmap_reserve(old_addr + old_size, new_size - old_size);
> +                mmap_reserve(old_addr + old_size, old_size - new_size);
>              }
>          } else {
>              errno = ENOMEM;
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]