qemu-devel
[Top][All Lists]
Advanced

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

Re: Re: [PATCH] console: avoid passing con=NULL to graphic_hw_update_don


From: lichun
Subject: Re: Re: [PATCH] console: avoid passing con=NULL to graphic_hw_update_done() In graphic_hw_update(), first select an existing console, a specific-console or active_console(if not specified), then updating the console.
Date: Fri, 6 Nov 2020 09:35:50 +0000

>  Hi,
>
>If you have an long commit message put it into the body not the subject
>please. 
Okey, I should leave a blank line.
>
>On Sat, Nov 07, 2020 at 01:03:39AM +0800, lichun wrote:
>> Signed-off-by: lichun <lichun@ruijie.com.cn>
>> ---
>>  ui/console.c | 5 +++--
>>  1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/ui/console.c b/ui/console.c
>> index e8e5970..e07d2c3 100644
>> --- a/ui/console.c
>> +++ b/ui/console.c
>> @@ -270,10 +270,11 @@ void graphic_hw_update_done(QemuConsole *con)
>>  void graphic_hw_update(QemuConsole *con)
>>  {
>>      bool async = false;
>> +    con = con ? con : active_console;
>
>con should not be NULL at this point.
>
>Can you trigger a NULL pointer dereference here somehow? 
run #./qemu-system-x86_64 -nodefaults test.img -vnc 0.0.0.0:0
Then connect with VNC client, It will cause QEMU CRASH.
>
>thanks,
>  Gerd
>

reply via email to

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