Re: [Qemu-devel] [PATCH] vl: fix possible int overflow for qemu_timedate_diff()

2018-02-07 Thread Gonglei (Arei)
> -Original Message- > From: Paolo Bonzini [mailto:pbonz...@redhat.com] > Sent: Tuesday, February 06, 2018 11:52 PM > To: Gonglei (Arei); qemu-devel@nongnu.org > Cc: shenghualong > Subject: Re: [PATCH] vl: fix possible int overflow for qemu_timedate_diff() > > On 01/02/2018 12:59, Gonglei

Re: [Qemu-devel] [PATCH] vl: fix possible int overflow for qemu_timedate_diff()

2018-02-06 Thread Paolo Bonzini
On 01/02/2018 12:59, Gonglei wrote: > From: shenghualong > > When the Windows guest users set the time to year 2099, > the return value of qemu_timedate_diff() will overflow > with variable clock mode as below format: > > > > Let's change the return value of qemu_timedate_diff() from > int to

[Qemu-devel] [PATCH] vl: fix possible int overflow for qemu_timedate_diff()

2018-02-01 Thread Gonglei
From: shenghualong When the Windows guest users set the time to year 2099, the return value of qemu_timedate_diff() will overflow with variable clock mode as below format: Let's change the return value of qemu_timedate_diff() from int to time_t to fix the possible overflow problem. Signed-of