projects
/
openjpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
832dfd1
)
Avoid assertion when running opj_j2k_merge_ppt() several time due to e6674f7ed66abdb3...
author
Even Rouault
<even.rouault@spatialys.com>
Wed, 20 Jun 2018 12:54:09 +0000
(14:54 +0200)
committer
Even Rouault
<even.rouault@spatialys.com>
Wed, 20 Jun 2018 13:12:47 +0000
(15:12 +0200)
src/lib/openjp2/j2k.c
patch
|
blob
|
history
diff --git
a/src/lib/openjp2/j2k.c
b/src/lib/openjp2/j2k.c
index 5109931fc254e3741497e0da8457454c7eec236c..28c7513f228dff20064c7fe2075ca3ae90e6775a 100644
(file)
--- a/
src/lib/openjp2/j2k.c
+++ b/
src/lib/openjp2/j2k.c
@@
-4094,7
+4094,12
@@
static OPJ_BOOL opj_j2k_merge_ppt(opj_tcp_t *p_tcp, opj_event_mgr_t * p_manager)
/* preconditions */
assert(p_tcp != 00);
assert(p_manager != 00);
- assert(p_tcp->ppt_buffer == NULL);
+
+ if (p_tcp->ppt_buffer != NULL) {
+ opj_event_msg(p_manager, EVT_ERROR,
+ "opj_j2k_merge_ppt() has already been called\n");
+ return OPJ_FALSE;
+ }
if (p_tcp->ppt == 0U) {
return OPJ_TRUE;