Home
last modified time | relevance | path

Searched hist:b5299153 (Results 1 – 1 of 1) sorted by relevance

/openbmc/qemu/ui/
H A Dvnc-enc-tight.cb5299153 Wed May 28 08:21:35 CDT 2014 Gonglei <arei.gonglei@huawei.com> vnc-enc-tight: Fix divide-by-zero in tight_detect_smooth_image{16,24,32}

Spotted by Coverity:

(1) Event assignment: Assigning: "pixels" = "0".
(2) Event cond_true: Condition "y < h", taking true branch
(3) Event cond_false: Condition "x < w", taking false branch
(4) Event loop_end: Reached end of loop
(5) Event divide_by_zero: In expression "(stats[0] + stats[1]) * 100U / pixels",
division by expression "pixels" which may be zero has undefined behavior.

290 DEFINE_DETECT_FUNCTION(16)
291 DEFINE_DETECT_FUNCTION(32)

Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>