diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2017-07-26 20:13:09 +0200 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2017-07-26 20:13:09 +0200 |
| commit | 94cc97c58acfa574e734fac5eb673c516c0ac469 (patch) | |
| tree | e43a24ca3cbc876cedb4630bb270f7666cdd9b5a /src | |
| parent | 8d2e69e37d01bf6a0440d3109d92235c3c586ffe (diff) | |
opj_decompress: fix null pointer dereference on comps[].data on id_000167,sig_11,src_006079,op_havoc,rep_4 (#939)
Diffstat (limited to 'src')
| -rw-r--r-- | src/bin/jp2/opj_decompress.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/bin/jp2/opj_decompress.c b/src/bin/jp2/opj_decompress.c index 3dc651dd..aa21c66d 100644 --- a/src/bin/jp2/opj_decompress.c +++ b/src/bin/jp2/opj_decompress.c @@ -1489,6 +1489,17 @@ int main(int argc, char **argv) } } + /* FIXME? Shouldn't that situation be considered as an error of */ + /* opj_decode() / opj_get_decoded_tile() ? */ + if (image->comps[0].data == NULL) { + fprintf(stderr, "ERROR -> opj_decompress: no image data!\n"); + opj_destroy_codec(l_codec); + opj_stream_destroy(l_stream); + opj_image_destroy(image); + failed = 1; + goto fin; + } + tCumulative += opj_clock() - t; numDecompressedImages++; |
