qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v3 03/13] linux-user/strace: Display invalid poi


From: Laurent Vivier
Subject: Re: [Qemu-devel] [PATCH v3 03/13] linux-user/strace: Display invalid pointer in print_timeval()
Date: Mon, 2 Jul 2018 20:18:54 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0

Le 02/07/2018 à 19:50, Philippe Mathieu-Daudé a écrit :
> Suggested-by: Laurent Vivier <address@hidden>
> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
> ---
>  linux-user/strace.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/linux-user/strace.c b/linux-user/strace.c
> index bd897a3f20..311e63ef75 100644
> --- a/linux-user/strace.c
> +++ b/linux-user/strace.c
> @@ -1173,8 +1173,10 @@ print_timeval(abi_ulong tv_addr, int last)
>          struct target_timeval *tv;
>  
>          tv = lock_user(VERIFY_READ, tv_addr, sizeof(*tv), 1);
> -        if (!tv)
> +        if (!tv) {
> +            print_pointer(tv, last);

tv is NULL here. we want to print the value of tv_addr.

Thanks,
Laurent



reply via email to

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