mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice-common
synced 2026-08-12 21:49:51 +00:00
coverity: avoid dereference after null check
All decompress functions used after this check take into account that encoder->palette is not NULL. So, if we already detected that the palette is NULL, let's just return early. Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com> Acked-by: Victor Toso <victortoso@redhat.com>
This commit is contained in:
parent
89b902789b
commit
3312a0f70b
@ -647,6 +647,7 @@ void lz_decode(LzContext *lz, LzImageType to_type, uint8_t *buf)
|
||||
if (!encoder->palette) {
|
||||
encoder->usr->error(encoder->usr,
|
||||
"a palette is missing (for bpp to rgb decoding)\n");
|
||||
return;
|
||||
}
|
||||
switch (encoder->type) {
|
||||
case LZ_IMAGE_TYPE_PLT1_BE:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user