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

Side by Side Diff: third_party/libopenjpeg20/0004-j2k_read_mcc.patch

Issue 1524553002: Merge to XFA: openjpeg: fix incrementing of "l_tcp->m_nb_mcc_records" in opj_j2k_read_mcc (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years 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
« no previous file with comments | « no previous file | third_party/libopenjpeg20/README.pdfium » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 diff --git a/third_party/libopenjpeg20/j2k.c b/third_party/libopenjpeg20/j2k.c
2 index 849d0b4..b20f219 100644
3 --- a/third_party/libopenjpeg20/j2k.c
4 +++ b/third_party/libopenjpeg20/j2k.c
5 @@ -5341,6 +5341,7 @@ static OPJ_BOOL opj_j2k_read_mcc ( opj_j2k_t *p_j2k,
6 OPJ_UINT32 l_nb_collections;
7 OPJ_UINT32 l_nb_comps;
8 OPJ_UINT32 l_nb_bytes_by_comp;
9 + OPJ_BOOL new_mcc = OPJ_FALSE;
10
11 /* preconditions */
12 assert(p_header_data != 00);
13 @@ -5402,6 +5403,7 @@ static OPJ_BOOL opj_j2k_read_mcc ( opj_j2k_t *p_j2k,
14 memset(l_mcc_record,0,(l_tcp->m_nb_max_mcc_records-l_tc p->m_nb_mcc_records) * sizeof(opj_simple_mcc_decorrelation_data_t));
15 }
16 l_mcc_record = l_tcp->m_mcc_records + l_tcp->m_nb_mcc_records;
17 + new_mcc = OPJ_TRUE;
18 }
19 l_mcc_record->m_index = l_indix;
20
21 @@ -5537,7 +5539,9 @@ static OPJ_BOOL opj_j2k_read_mcc ( opj_j2k_t *p_j2k,
22 return OPJ_FALSE;
23 }
24
25 - ++l_tcp->m_nb_mcc_records;
26 + if (new_mcc) {
27 + ++l_tcp->m_nb_mcc_records;
28 + }
29
30 return OPJ_TRUE;
31 }
OLDNEW
« no previous file with comments | « no previous file | third_party/libopenjpeg20/README.pdfium » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698