projects
/
openjpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8d2e69e
)
opj_decompress: fix null pointer dereference on comps[].data on id_000167,sig_11...
author
Even Rouault
<even.rouault@spatialys.com>
Wed, 26 Jul 2017 18:13:09 +0000
(20:13 +0200)
committer
Even Rouault
<even.rouault@spatialys.com>
Wed, 26 Jul 2017 18:13:09 +0000
(20:13 +0200)
src/bin/jp2/opj_decompress.c
patch
|
blob
|
history
diff --git
a/src/bin/jp2/opj_decompress.c
b/src/bin/jp2/opj_decompress.c
index 3dc651ddcbfbce35b099a5a60249f2955df45d72..aa21c66dbf11743509b6b94865c982c8fb80f574 100644
(file)
--- 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++;