| OLD | NEW |
| 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 1230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1241 l_step_c = l_max_prec * l_step_p; | 1241 l_step_c = l_max_prec * l_step_p; |
| 1242 l_step_r = p_image->numcomps * l_step_c; | 1242 l_step_r = p_image->numcomps * l_step_c; |
| 1243 l_step_l = l_max_res * l_step_r; | 1243 l_step_l = l_max_res * l_step_r; |
| 1244 | 1244 |
| 1245 /* set values for first packet iterator */ | 1245 /* set values for first packet iterator */ |
| 1246 l_current_pi = l_pi; | 1246 l_current_pi = l_pi; |
| 1247 | 1247 |
| 1248 /* memory allocation for include */ | 1248 /* memory allocation for include */ |
| 1249 l_current_pi->include = 00; | 1249 l_current_pi->include = 00; |
| 1250 if | 1250 if |
| 1251 » » (l_step_l && l_tcp->numlayers < UINT_MAX / l_step_l - 1) | 1251 » » (l_step_l && l_tcp->numlayers < UINT_MAX / sizeof(OPJ_INT16) / l
_step_l - 1) |
| 1252 { | 1252 { |
| 1253 l_current_pi->include = (OPJ_INT16*)opj_calloc((l_tcp->numlayers
+ 1) * l_step_l, sizeof(OPJ_INT16)); | 1253 l_current_pi->include = (OPJ_INT16*)opj_calloc((l_tcp->numlayers
+ 1) * l_step_l, sizeof(OPJ_INT16)); |
| 1254 } | 1254 } |
| 1255 | 1255 |
| 1256 if | 1256 if |
| 1257 (!l_current_pi->include) | 1257 (!l_current_pi->include) |
| 1258 { | 1258 { |
| 1259 opj_free(l_tmp_data); | 1259 opj_free(l_tmp_data); |
| 1260 opj_free(l_tmp_ptr); | 1260 opj_free(l_tmp_ptr); |
| 1261 opj_pi_destroy(l_pi, l_bound); | 1261 opj_pi_destroy(l_pi, l_bound); |
| (...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 } |
| OLD | NEW |