Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: third_party/libopenjpeg20/0002-packet-iterator.patch

Issue 1338973005: upgrade openjpeg to commit# cf352af (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 diff --git a/third_party/libopenjpeg20/pi.c b/third_party/libopenjpeg20/pi.c
2 index 1697bcb..06f1e41 100644
3 --- a/third_party/libopenjpeg20/pi.c
4 +++ b/third_party/libopenjpeg20/pi.c
5 @@ -36,6 +36,7 @@
6 * POSSIBILITY OF SUCH DAMAGE.
7 */
8
9 +#include <limits.h>
10 #include "opj_includes.h"
11
12 /** @defgroup PI PI - Implementation of a packet iterator */
13 @@ -1236,7 +1237,13 @@ opj_pi_iterator_t *opj_pi_create_decode(opj_image_t *p_im age,
14 l_current_pi = l_pi;
15
16 /* memory allocation for include */
17 - l_current_pi->include = (OPJ_INT16*) opj_calloc((l_tcp->numlayers +1) * l_step_l, sizeof(OPJ_INT16));
18 + l_current_pi->include = 00;
19 + if
20 + (l_step_l && l_tcp->numlayers < UINT_MAX / l_step_l - 1)
21 + {
22 + l_current_pi->include = (OPJ_INT16*)opj_calloc((l_tcp->numlayers + 1) * l_step_l, sizeof(OPJ_INT16));
23 + }
24 +
25 if
26 (!l_current_pi->include)
27 {
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698