mansoor-ahmed / openjpeg

Automatically exported from code.google.com/p/openjpeg
Other
0 stars 0 forks source link

Compression fails when precincts are set #46

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Set precincts as follow :
    parameters.res_spec =1;
    parameters.prcw_init[0] = 64;
    parameters.prch_init[0] = 64;
2. Compress an image 

What is the expected output? What do you see instead?
-Program crash with Access violation

What version of the product are you using? On what operating system?
- V2 branch from SVN (17 NOV)

Please provide any additional information below.
Crash occur on in j2k.c after line 8037 :
8014:for (j = tccp->numresolutions - 1; j >= 0; j--) {
...
8037:  tccp->prcw[j] = int_floorlog2(size_prcw); 

Because of the "for" condition j rolls over to 4292778402; this results in an 
access violation when tccp->prcw[j] is written. Changing the condition from "j 
>= 0" to "j > 0" should fix this issue.

Original issue reported on code.google.com by jf.pamb...@gmail.com on 19 Nov 2010 at 7:50

GoogleCodeExporter commented 9 years ago

Original comment by mathieu.malaterre on 25 Feb 2014 at 3:22

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r2494.

Original comment by mathieu.malaterre on 27 Feb 2014 at 10:02

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r2496.

Original comment by mathieu.malaterre on 27 Feb 2014 at 10:03