mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-24 02:42:48 +00:00
kimgio: return false if the color component count is invalid from jp2 plugin
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
94934907ec
commit
f863bb36ef
1 changed files with 4 additions and 2 deletions
|
@ -250,14 +250,16 @@ bool JP2Handler::read(QImage *image)
|
||||||
default: {
|
default: {
|
||||||
kWarning() << "Invalid color component count" << ojimage->numcomps;
|
kWarning() << "Invalid color component count" << ojimage->numcomps;
|
||||||
*image = QImage();
|
*image = QImage();
|
||||||
break;
|
opj_destroy_codec(ojcodec);
|
||||||
|
opj_stream_destroy(ojstream);
|
||||||
|
opj_image_destroy(ojimage);
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
opj_destroy_codec(ojcodec);
|
opj_destroy_codec(ojcodec);
|
||||||
opj_stream_destroy(ojstream);
|
opj_stream_destroy(ojstream);
|
||||||
opj_image_destroy(ojimage);
|
opj_image_destroy(ojimage);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue