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

Side by Side Diff: third_party/libopenjpeg20/pi.c

Issue 1583233008: openjpeg: Set proper upper bound for an array in opj_pi_update_decode_poc(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « third_party/libopenjpeg20/README.pdfium ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * The copyright in this software is being made available under the 2-clauses 2 * The copyright in this software is being made available under the 2-clauses
3 * BSD License, included below. This software may be subject to other third 3 * BSD License, included below. This software may be subject to other third
4 * party and contributor rights, including patent rights, and no such rights 4 * party and contributor rights, including patent rights, and no such rights
5 * are granted under this license. 5 * are granted under this license.
6 * 6 *
7 * Copyright (c) 2002-2014, Universite catholique de Louvain (UCL), Belgium 7 * Copyright (c) 2002-2014, Universite catholique de Louvain (UCL), Belgium
8 * Copyright (c) 2002-2014, Professor Benoit Macq 8 * Copyright (c) 2002-2014, Professor Benoit Macq
9 * Copyright (c) 2001-2003, David Janssens 9 * Copyright (c) 2001-2003, David Janssens
10 * Copyright (c) 2002-2003, Yannick Verschueren 10 * Copyright (c) 2002-2003, Yannick Verschueren
(...skipping 1010 matching lines...) Expand 10 before | Expand all | Expand 10 after
1021 for (pino = 0;pino<l_bound;++pino) { 1021 for (pino = 0;pino<l_bound;++pino) {
1022 l_current_pi->poc.prg = l_current_poc->prg; /* Progression Order #0 */ 1022 l_current_pi->poc.prg = l_current_poc->prg; /* Progression Order #0 */
1023 l_current_pi->first = 1; 1023 l_current_pi->first = 1;
1024 1024
1025 l_current_pi->poc.resno0 = l_current_poc->resno0; /* Resolution Level Index #0 (Start) */ 1025 l_current_pi->poc.resno0 = l_current_poc->resno0; /* Resolution Level Index #0 (Start) */
1026 l_current_pi->poc.compno0 = l_current_poc->compno0; /* Component Index #0 (Start) */ 1026 l_current_pi->poc.compno0 = l_current_poc->compno0; /* Component Index #0 (Start) */
1027 l_current_pi->poc.layno0 = 0; 1027 l_current_pi->poc.layno0 = 0;
1028 l_current_pi->poc.precno0 = 0; 1028 l_current_pi->poc.precno0 = 0;
1029 l_current_pi->poc.resno1 = l_current_poc->resno1; /* Resolution Level Index #0 (End) */ 1029 l_current_pi->poc.resno1 = l_current_poc->resno1; /* Resolution Level Index #0 (End) */
1030 l_current_pi->poc.compno1 = l_current_poc->compno1; /* Component Index #0 (End) */ 1030 l_current_pi->poc.compno1 = l_current_poc->compno1; /* Component Index #0 (End) */
1031 » » l_current_pi->poc.layno1 = l_current_poc->layno1; /* Layer Index #0 (End) */ 1031 » » l_current_pi->poc.layno1 = opj_uint_min(l_current_poc->layno1, p _tcp->numlayers); /* Layer Index #0 (End) */
1032 l_current_pi->poc.precno1 = p_max_precision; 1032 l_current_pi->poc.precno1 = p_max_precision;
1033 ++l_current_pi; 1033 ++l_current_pi;
1034 ++l_current_poc; 1034 ++l_current_poc;
1035 } 1035 }
1036 } 1036 }
1037 1037
1038 static void opj_pi_update_decode_not_poc (opj_pi_iterator_t * p_pi, 1038 static void opj_pi_update_decode_not_poc (opj_pi_iterator_t * p_pi,
1039 opj_tcp_t * p_tcp, 1039 opj_tcp_t * p_tcp,
1040 OPJ_UINT32 p_max_precision, 1040 OPJ_UINT32 p_max_precision,
1041 OPJ_UINT32 p_max_res) 1041 OPJ_UINT32 p_max_res)
(...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after
1884 case OPJ_PCRL: 1884 case OPJ_PCRL:
1885 return opj_pi_next_pcrl(pi); 1885 return opj_pi_next_pcrl(pi);
1886 case OPJ_CPRL: 1886 case OPJ_CPRL:
1887 return opj_pi_next_cprl(pi); 1887 return opj_pi_next_cprl(pi);
1888 case OPJ_PROG_UNKNOWN: 1888 case OPJ_PROG_UNKNOWN:
1889 return OPJ_FALSE; 1889 return OPJ_FALSE;
1890 } 1890 }
1891 1891
1892 return OPJ_FALSE; 1892 return OPJ_FALSE;
1893 } 1893 }
OLDNEW
« no previous file with comments | « third_party/libopenjpeg20/README.pdfium ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698