diff options
author | Markus Armbruster <armbru@redhat.com> | 2014-02-21 16:42:52 +0100 |
---|---|---|
committer | Michael Roth <mdroth@linux.vnet.ibm.com> | 2014-07-15 19:28:02 -0500 |
commit | 02835d57444ce7308931b71cabbe5fb1d7d8b9eb (patch) | |
tree | af43d5981cdf8c79918bfa29d6abca96feca2177 /target-i386/cpu-qom.h | |
parent | 41ee91810e8ae15ac9bc84ccf358c6f425f7ba6f (diff) |
vnc: Fix tight_detect_smooth_image() for lossless case
VncTight member uint8_t quality is either (uint8_t)-1 for lossless or
less than 10 for lossy.
tight_detect_smooth_image() first promotes it to int, then compares
with -1. Always unequal, so we always execute the lossy code. Reads
beyond tight_conf[] and returns crap when quality is actually
lossless.
Compare to (uint8_t)-1 instead, like we do elsewhere.
Spotted by Coverity.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
(cherry picked from commit 2e7bcdb99adbd8fc10ad9ddcf93bd2bf3c0f1f2d)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Diffstat (limited to 'target-i386/cpu-qom.h')
0 files changed, 0 insertions, 0 deletions