mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 10:22: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: {
|
||||
kWarning() << "Invalid color component count" << ojimage->numcomps;
|
||||
*image = QImage();
|
||||
break;
|
||||
opj_destroy_codec(ojcodec);
|
||||
opj_stream_destroy(ojstream);
|
||||
opj_image_destroy(ojimage);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
opj_destroy_codec(ojcodec);
|
||||
opj_stream_destroy(ojstream);
|
||||
opj_image_destroy(ojimage);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue