summaryrefslogtreecommitdiff
path: root/src/lib/openjp2/jp2.c
AgeCommit message (Collapse)Author
2017-08-17Avoid asserting on assert(i == pcol) in opj_jp2_apply_pclr() by adding new ↵Even Rouault
check in opj_jp2_check_color(). Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3068. Credit to OSS Fuzz
2017-08-09Partial revert BPC related check of #975 (#979)Even Rouault
PR #975 introduced a check that rejects images that have different bit depth/sign per compoment in SIZ marker if the JP2 IHDR box has BPC != 255 This didn't work properly if decoding a .j2k file since the new bit added in opj_cp_t wasn't initialized to the right value. For clarity, tThis new bit has also been renamed to allow_different_bit_depth_sign But looking closer at the code, it seems we were already tolerant to inconsistencies. For example we parsed a JP2 BPCC box even if BPC != 255 (just a warning is emitted) So failing hard in opj_j2k_read_siz() wouldn't be very inconsistent, and that alone cannot protect against other issues, so just emit a warning if BPC != 255 and the SIZ marker contains different bit depth/sign per component. Note: we could also check that the content of JP2 BPCC box is consistant with the one of the SIZ marker.
2017-08-08Merge pull request #975 from szukw000/changes-for-afl-testsAntonin Descampe
Catch images broken by AFL
2017-08-07opj_jp2_apply_pclr() also needs to use opj_image_data_alloc/opj_image_data_freeEven Rouault
2017-08-02First change on changes-for-afl-testsszukw000
2017-07-31Catch images broken by AFLszukw000
2017-07-30Fix warnings in USE_JPIP compilation modeEven Rouault
2017-07-30Fix Doxygen warnings (patch derived from Winfried's doxygen-dif.txt.zip, #849)Even Rouault
2017-07-30Avoid p_stream->m_user_data_length >= (OPJ_UINT64)p_stream->m_byte_offset ↵Even Rouault
assertion in opj_stream_get_number_byte_left(). Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2786. Credit to OSS Fuzz
2017-07-28Fix null pointer dereference in opj_jp2_apply_pclr(). Fixes ↵Even Rouault
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2558. Credit to OSS Fuzz
2017-07-27opj_jp2_check_color(): replace assertion regarding mtyp by runtime check ↵Even Rouault
(#672, #895) Fixes test case openjeg-crashes-2017-07-27/id:000000,sig:06,src:000001,op:flip1,pos:808.jp2 of #895
2017-07-26Spelling fixes (patch by ka7, #890, rebased on top of master)Even Rouault
2017-05-23CMake: add stronger warnings for openjp2 lib/bin by default, and error out ↵Even Rouault
on declaration-after-statement And remove occurences of unused arguments in src/lib/openjp2
2017-05-09Reformat whole codebase with astyle.options (#128)Even Rouault
2016-09-08Merge branch 'master' of https://github.com/uclouvain/openjpeg into ↵Even Rouault
tier1_optimizations_multithreading_2 Conflicts: src/lib/openjp2/t1.c
2016-09-06Fix leak & invalid behavior of opj_jp2_read_ihdr (#818)Matthieu Darbois
In case multiple ihdr box are present, only the first one shall be taken into account.
2016-05-25Add opj_codec_set_threads() in public API and propagate resulting thread ↵Even Rouault
pool to tcd level By default, only the main thread is used. If opj_codec_set_threads() is not used, but the OPJ_NUM_THREADS environment variable is set, its value will be used to initialize the number of threads. The value can be either an integer number, or "ALL_CPUS". If OPJ_NUM_THREADS is set and this function is called, this function will override the behaviour of the environment variable.
2016-04-29cppcheck fix for openjp2 (#740)julienmalik
2015-11-07Fix undefined size jp2 box handlingmayeut
Update #653
2015-10-29Fix typo in commentsStefan Weil
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-10-06Added missing casts for return values of opj_malloc()/opj_calloc().Stephan Mühlstrasser
2015-09-29Fix typos in comments and stringStefan Weil
Most typos were found by codespell. Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-08-21Fix formattingmayeut
2015-08-21Merge pull request #559 from szukw000/cmyk-cielab-esyccMatthieu Darbois
Add support for CIELab, EYCC and CMYK
2015-07-30Defines three new functionsszukw000
Declares three new functions Calls the three new functions Collects data for CIELab, sets the color_space for EYCC and CMYK
2015-07-30Remove printf/fprintf to stdout/stderr throughout openjp2 libmayeut
Update uclouvain/openjpeg#246
2015-07-23Add some missing static keywordsmayeut
Update uclouvain/openjpeg#243
2015-07-12Add checks for odd looking cmap & for cmap outside jp2h boxmayeut
Update uclouvain/openjpeg#235 Update uclouvain/openjpeg#447
2015-01-20[trunk] checks for JP2 signature and file type boxes more carefullyAntonin Descampe
Update issue 430
2014-12-22[trunk] fixed compression check for 1 bit unsigned component (fixes issue 457)Matthieu Darbois
2014-11-24[trunk] removed warnings when building jp2.c (Update issue 442)Matthieu Darbois
2014-11-20[trunk] added check for pclr box validity (fixes issue 429)Matthieu Darbois
2014-11-18[trunk] remove warning during build (fixes issue 435)Matthieu Darbois
2014-11-17[trunk] fixed a bug preventing palette image with cdef to decode properly ↵Matthieu Darbois
using opj_get_decoded_tile (fixes issue 428)
2014-11-03[trunk] add a cdef box when alpha component is present (fixes issue 416)Antonin Descampe
2014-10-30[trunk] fixed a bug preventing palette image with cdef to decode properly ↵Antonin Descampe
(fixes issue 412)
2014-10-30[trunk] fixed a bug that was preventing image with per channel alpha to ↵Antonin Descampe
decode properly (fixes issue 414)
2014-10-21[trunk] verify channel definitions is complete when cdef is present (fixes ↵Antonin Descampe
issue 397)
2014-10-21[trunk] added check on JP2_IHDR box (fixes issue 364)Antonin Descampe
2014-10-06[trunk] fixed potential negative size params (fixes issue 390)Antonin Descampe
2014-10-06[trunk] added box length inconsistency checkAntonin Descampe
Update issue 364 issue364-38.patch applied. Thanks Matthieu.
2014-10-06[trunk] fixed PDF crash in Chrome (fixes issue 362)Antonin Descampe
2014-10-03[trunk] removed illegal character in commentAntonin Descampe
2014-09-19added memory allocation checks (fixes issue 355)Antonin Descampe
2014-09-16[trunk] improve memory management (fixes issue 359)Antonin Descampe
2014-04-03[trunk] updated copyright and added copyright notice required by ISO, in ↵Antonin Descampe
each file; updated AUTHORS, NEWS
2014-03-14[trunk] rework code from r2463. Really there has been some code duplication ↵Mathieu Malaterre
from r2413 Thanks to John Rogers (oracle.com) for report
2014-03-14[trunk] rework code from r2463. Really there has been some code duplication ↵Mathieu Malaterre
from r2413 Thanks to John Rogers (oracle.com) for report
2014-03-11[trunk] Fix remainings warnings on linux/32bits archMathieu Malaterre
2014-03-07[trunk] Another round of fixes for sign conversion warnings.Mathieu Malaterre
Update issue 256