xinxinlx / openjpeg

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

opj_compress crashes when number of resolutions is set to zero #352

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. opj_compress .... -n 0

What is the expected output? What do you see instead?

I expect to be warned that number of resolutions should be a positive number 
greater than 1. What I actually see is a crash.

What version of the product are you using? On what operating system?

I am using the latest "trunk" on windows.

Please provide any additional information below.

Original issue reported on code.google.com by boxe...@gmail.com on 28 May 2014 at 7:40

GoogleCodeExporter commented 9 years ago
Attached patch adds checks on resolution in the library (not in opj_compress 
itself, fails "slowly" but it's safer to add there as it might not show up if 
opj_compress does the check).

There also were crash for values > 31 (32 & 33 are said to be valid in the 
ISO15444-1 but check against tile size was not failing as it should)

Verified against test suite, no regression

Original comment by m.darb...@gmail.com on 10 Oct 2014 at 6:46

Attachments:

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

Original comment by antonin on 21 Oct 2014 at 12:47