projects
/
openjpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7711307
)
Workaround Coverity CID 113061
author
Even Rouault
<even.rouault@spatialys.com>
Thu, 21 Sep 2017 12:13:16 +0000
(14:13 +0200)
committer
Even Rouault
<even.rouault@spatialys.com>
Thu, 21 Sep 2017 12:13:16 +0000
(14:13 +0200)
src/lib/openjp2/j2k.c
patch
|
blob
|
history
diff --git
a/src/lib/openjp2/j2k.c
b/src/lib/openjp2/j2k.c
index f517ff882466a207dcb0f0992d83251a9f183678..52f9c98ebce1312a2dad0f13680c56df62efa3ed 100644
(file)
--- a/
src/lib/openjp2/j2k.c
+++ b/
src/lib/openjp2/j2k.c
@@
-11136,6
+11136,11
@@
OPJ_BOOL opj_j2k_encode(opj_j2k_t * p_j2k,
l_current_data = l_new_current_data;
l_max_tile_size = l_current_tile_size;
}
+ if (l_current_data == NULL) {
+ /* Shoul not happen in practice, but will avoid Coverity to */
+ /* complain about a null pointer dereference */
+ return OPJ_FALSE;
+ }
/* copy image data (32 bit) to l_current_data as contiguous, all-component, zero offset buffer */
/* 32 bit components @ 8 bit precision get converted to 8 bit */