diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2015-12-17 15:56:57 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2015-12-18 11:09:56 +0100 |
commit | f6bcda9f71ecb868aa438e0906d001025bd3389a (patch) | |
tree | c4ce00492a7c75347631e74c35d1a0b46cdcfb4f | |
parent | 55eaa72e1dea57833bbe7e3676280c86d916277c (diff) |
openjpegdec: Don't crash when decoding returns NULL data for any component
https://bugzilla.gnome.org/show_bug.cgi?id=758943
-rw-r--r-- | ext/openjpeg/gstopenjpegdec.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/openjpeg/gstopenjpegdec.c b/ext/openjpeg/gstopenjpegdec.c index 53dc5f6a2..112b3abab 100644 --- a/ext/openjpeg/gstopenjpegdec.c +++ b/ext/openjpeg/gstopenjpegdec.c @@ -1050,6 +1050,15 @@ gst_openjpeg_dec_handle_frame (GstVideoDecoder * decoder, goto decode_error; #endif + { + gint i; + + for (i = 0; i < image->numcomps; i++) { + if (image->comps[i].data == NULL) + goto decode_error; + } + } + gst_buffer_unmap (frame->input_buffer, &map); ret = gst_openjpeg_dec_negotiate (self, image); |