> -Original Message-
> From: Gerd Hoffmann [mailto:kra...@redhat.com]
> Sent: Thursday, June 12, 2014 6:44 PM
> To: Gonglei (Arei)
> Cc: qemu-devel@nongnu.org; pbonz...@redhat.com; lcapitul...@redhat.com;
> av1...@comtv.ru; stefa...@redhat.com; Luonengjun; Huangweidong (C)
> Subject: Re: [P
Il 12/06/2014 12:43, Gerd Hoffmann ha scritto:
That doesn't fix the reported issue. It's "width" which Coverity thinks
might be zero, not cursor_offset. And cursor_offset being zero is
perfectly fine, happens when the cursor is in the upper left corner.
I have no idea why Coverity thinks width
Hi,
> 2097if (cursor_visible && cursor_offset < size && cursor_offset >= 0)
> (23) Event divide_by_zero: In expression "cursor_offset / width",
> division by expression "width" which may be zero has undefined behavior.
> -if (cursor_visible && cursor_offset < size && cursor_off
From: Gonglei
Spotted by Coverity:
(20) Event cond_true: Condition "cursor_visible", taking true branch
(21) Event cond_true: Condition "cursor_offset < size", taking true branch
(22) Event cond_true: Condition "cursor_offset >= 0", taking true branch
2097if (cursor_visible && cursor_off