projects
/
openjpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7256e43
)
[trunk] added box length inconsistency check
author
Antonin Descampe
<antonin@gmail.com>
Mon, 6 Oct 2014 21:05:27 +0000
(21:05 +0000)
committer
Antonin Descampe
<antonin@gmail.com>
Mon, 6 Oct 2014 21:05:27 +0000
(21:05 +0000)
Update issue 364
issue364-38.patch applied. Thanks Matthieu.
src/lib/openjp2/jp2.c
patch
|
blob
|
history
diff --git
a/src/lib/openjp2/jp2.c
b/src/lib/openjp2/jp2.c
index d408d8e4a9c92f4e475af89d68fbe997d237f582..c77bfaaef8fd7792fb5095149bd09c49b26e8ff8 100644
(file)
--- a/
src/lib/openjp2/jp2.c
+++ b/
src/lib/openjp2/jp2.c
@@
-2282,7
+2282,10
@@
OPJ_BOOL opj_jp2_read_boxhdr_char( opj_jp2_box_t *box,
opj_event_msg(p_manager, EVT_ERROR, "Cannot handle box of undefined sizes\n");
return OPJ_FALSE;
}
-
+ if (box->length < *p_number_bytes_read) {
+ opj_event_msg(p_manager, EVT_ERROR, "Box length is inconsistent.\n");
+ return OPJ_FALSE;
+ }
return OPJ_TRUE;
}