diff options
| author | Mathieu Malaterre <mathieu.malaterre@gmail.com> | 2014-03-13 13:47:44 +0000 |
|---|---|---|
| committer | Mathieu Malaterre <mathieu.malaterre@gmail.com> | 2014-03-13 13:47:44 +0000 |
| commit | 565ef29ae358c1b09f6eb1f58e67df7725ffd2bf (patch) | |
| tree | 6c009ba74b015345ba835cfbe78e001639243fa1 /src/lib | |
| parent | 68398b2a5ac7505d608adc4f45e128a87bab9ce7 (diff) | |
[trunk] Make sure to reallocate ppm data buffer when multiple Ippm(i) buffer are found
This handle the case where remaining data is exactly Nppm(i)
Fixes issue 287
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/openjp2/j2k.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/openjp2/j2k.c b/src/lib/openjp2/j2k.c index e446dab0..553833a9 100644 --- a/src/lib/openjp2/j2k.c +++ b/src/lib/openjp2/j2k.c @@ -3634,7 +3634,7 @@ OPJ_BOOL j2k_read_ppm_v3 ( l_remaining_data = p_header_size; /* Next Ippm series is a complete series ?*/ - if (l_remaining_data > l_N_ppm) { + if (l_remaining_data >= l_N_ppm) { OPJ_BYTE *new_ppm_data; /* Increase the size of ppm_data to add the new Ippm series*/ assert(l_cp->ppm_data == l_cp->ppm_buffer && "We need ppm_data and ppm_buffer to be the same when reallocating"); |
