Commit Graph

68 Commits

Author SHA1 Message Date
Matthieu Darbois d60b7aa130 Fix leak & invalid behavior of opj_jp2_read_ihdr (#818)
In case multiple ihdr box are present, only the first one shall be
taken into account.
2016-09-13 11:00:08 +02:00
julienmalik 319fc971fe cppcheck fix for openjp2 (#740) 2016-04-29 23:49:17 +02:00
mayeut fb4be3894e Fix undefined size jp2 box handling
Update #653
2015-11-07 01:35:43 +01:00
Stefan Weil 9f78c68953 Fix typo in comments
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-10-29 20:37:27 +01:00
Stephan Mühlstrasser d6b51b7041 Added missing casts for return values of opj_malloc()/opj_calloc(). 2015-10-06 15:33:46 +02:00
Stefan Weil 99fc1ab306 Fix typos in comments and string
Most typos were found by codespell.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-09-29 05:55:43 +02:00
mayeut fa9142b7e4 Fix formatting 2015-08-21 20:15:50 +02:00
Matthieu Darbois 3109759fd7 Merge pull request #559 from szukw000/cmyk-cielab-esycc
Add support for CIELab, EYCC and CMYK
2015-08-21 19:48:31 +02:00
szukw000 238f4419ab Defines three new functions
Declares three new functions
Calls the three new functions
Collects data for CIELab, sets the color_space for EYCC and CMYK
2015-07-30 23:31:12 +00:00
mayeut 0df90afdf7 Remove printf/fprintf to stdout/stderr throughout openjp2 lib
Update uclouvain/openjpeg#246
2015-07-30 23:26:31 +02:00
mayeut a56819eaab Add some missing static keywords
Update uclouvain/openjpeg#243
2015-07-23 07:48:42 +02:00
mayeut 775ee87776 Add checks for odd looking cmap & for cmap outside jp2h box
Update uclouvain/openjpeg#235
Update uclouvain/openjpeg#447
2015-07-12 19:39:30 +02:00
Antonin Descampe 4c0ed02806 [trunk] checks for JP2 signature and file type boxes more carefully
Update issue 430
2015-01-20 14:27:20 +00:00
Matthieu Darbois bde5ba6ae8 [trunk] fixed compression check for 1 bit unsigned component (fixes issue 457) 2014-12-22 15:00:12 +00:00
Matthieu Darbois 04c6bb4a72 [trunk] removed warnings when building jp2.c (Update issue 442) 2014-11-24 21:31:09 +00:00
Matthieu Darbois 8397eac382 [trunk] added check for pclr box validity (fixes issue 429) 2014-11-20 23:47:09 +00:00
Matthieu Darbois f57f59b10d [trunk] remove warning during build (fixes issue 435) 2014-11-18 18:30:44 +00:00
Matthieu Darbois f123ce8f8a [trunk] fixed a bug preventing palette image with cdef to decode properly using opj_get_decoded_tile (fixes issue 428) 2014-11-17 21:46:43 +00:00
Antonin Descampe cf5153c518 [trunk] add a cdef box when alpha component is present (fixes issue 416) 2014-11-03 14:12:01 +00:00
Antonin Descampe 3b7dced8e6 [trunk] fixed a bug preventing palette image with cdef to decode properly (fixes issue 412) 2014-10-30 18:26:10 +00:00
Antonin Descampe 03a410e03d [trunk] fixed a bug that was preventing image with per channel alpha to decode properly (fixes issue 414) 2014-10-30 18:26:04 +00:00
Antonin Descampe 0a3f234df7 [trunk] verify channel definitions is complete when cdef is present (fixes issue 397) 2014-10-21 12:54:08 +00:00
Antonin Descampe e65303b903 [trunk] added check on JP2_IHDR box (fixes issue 364) 2014-10-21 12:35:16 +00:00
Antonin Descampe eb7c6d295a [trunk] fixed potential negative size params (fixes issue 390) 2014-10-06 21:05:32 +00:00
Antonin Descampe f126eb0d41 [trunk] added box length inconsistency check
Update issue 364

issue364-38.patch applied. Thanks Matthieu.
2014-10-06 21:05:27 +00:00
Antonin Descampe 7256e43c48 [trunk] fixed PDF crash in Chrome (fixes issue 362) 2014-10-06 21:05:21 +00:00
Antonin Descampe a0a3af1dee [trunk] removed illegal character in comment 2014-10-03 19:52:20 +00:00
Antonin Descampe 6868ee373e added memory allocation checks (fixes issue 355) 2014-09-19 10:26:35 +00:00
Antonin Descampe 50a205d20f [trunk] improve memory management (fixes issue 359) 2014-09-16 15:48:04 +00:00
Antonin Descampe d19a4ab676 [trunk] updated copyright and added copyright notice required by ISO, in each file; updated AUTHORS, NEWS 2014-04-03 15:30:57 +00:00
Mathieu Malaterre 15863e7170 [trunk] rework code from r2463. Really there has been some code duplication from r2413
Thanks to John Rogers (oracle.com) for report
2014-03-14 15:06:20 +00:00
Mathieu Malaterre 5e91877636 [trunk] rework code from r2463. Really there has been some code duplication from r2413
Thanks to John Rogers (oracle.com) for report
2014-03-14 15:04:24 +00:00
Mathieu Malaterre 5dd770746b [trunk] Fix remainings warnings on linux/32bits arch 2014-03-11 10:28:04 +00:00
Mathieu Malaterre ffad2fbe55 [trunk] Another round of fixes for sign conversion warnings.
Update issue 256
2014-03-07 14:14:31 +00:00
Mathieu Malaterre 7e64eb5414 [trunk] Remove some easy warnings about sign compare reported by gcc 2014-03-06 15:00:41 +00:00
Mathieu Malaterre 4d5d1f0f66 [trunk] Handle cmap where direct use is specified (issue235_cmapsubbox.jp2)
I doubt the old code ever work. The new code copy the old codestream bytes into the new components (instead of copying the pointer).
Technically the issue235.jp2 file should be handled since I.5.3.5 specifies that:
...
If the JP2 Header box does not contain a Component Mapping box, the components shall be mapped directly to channels,
such that component i is mapped to channel i.
...
Update issue 235
2014-03-05 09:45:04 +00:00
Mathieu Malaterre 74600cfb14 [trunk] Review warning about types conversion, and add cast when needed 2014-03-03 15:47:23 +00:00
Mathieu Malaterre 3c7a7a1675 [trunk] Remove deprecated functions.
Update issue 268
2014-03-03 08:30:36 +00:00
Mathieu Malaterre 2c876b6765 [trunk] Remove simple warnings about comments, missing case in switch statement 2014-03-02 10:16:54 +00:00
Mathieu Malaterre a347262468 [trunk] Import patch from issue 218. No dataset to check, so blindly applied it.
Fixes issue 218
2014-02-27 17:21:00 +00:00
Mathieu Malaterre 37a8d2acc1 [trunk] Import patch from sumatrapdf team. This handle testcase 1851.pdf.SIGSEGV.ce9.948
Update issue 225
2014-02-26 11:25:27 +00:00
Mathieu Malaterre 4a7ba87d99 [trunk] Import patch from sumatrapdf team. Start using new color space when found.
Update issue 225
2014-02-26 11:24:38 +00:00
Mathieu Malaterre 51e3764519 [trunk] Import patch from sumatrapdf team. This handle some Part-2 compliant file, by being more tolerant in COLR box. No testcase for now.
Fixes issue 247
2014-02-26 11:22:34 +00:00
Mathieu Malaterre 533d92aa8e [trunk] Import patch from sumatrapdf team. This handle some testcase with no input dataset, but changes looks ok.
Update issue 225
2014-02-26 11:21:18 +00:00
Mathieu Malaterre 1dedf7f0cd [trunk] Import patch from sumatrapdf team. Add a new function to check color box.
Update issue 225
2014-02-26 11:05:31 +00:00
Mathieu Malaterre 3da30304fc [trunk] Import patch from sumatrapdf team. This adds alpha handling. This patch changes ABI.
Update issue 225
2014-02-26 11:03:55 +00:00
Mathieu Malaterre a466755bbb [trunk] import commit 83dad6a76536222a3a51146f942e733a2e90ec52 from ghostpdl
fix potential NULL-pointer dereference caused by testing the wrong variable
after opj_realloc (happens only in OOM situations)

Update issue 225
2014-02-25 13:39:50 +00:00
Mathieu Malaterre 876c02206d [trunk] Import commit f4139d702559649e577a5df9cfd64b0ca6107a7a from ghostpdl
Several functions accept a buffer size but never actually check whether
the buffer overflows during reading/writing. This fixes all cases where
a size variable has explicitly been marked as unused (through a (void)
cast).

This was discovered while investigating an assertion caused by
7cc691f332f26802c64cdc47e17bff8b_signal_sigabrt_7ffff6d59425_2247_2509.pdf
among others.

Thanks to Mateusz Jurczyk and Gynvael Coldwind of the Google Security
Team for providing the example files.
2014-02-25 13:28:37 +00:00
Mickael Savinaud f769d5e27f [trunk] manage correctly the case where meth value is not correct (thanks winfried) 2013-03-17 18:27:41 +00:00
Mickael Savinaud 1e414c8f37 [trunk] correct issue 188 (thanks winfried) and add test about it. Fixes issue 188 2013-03-17 18:16:03 +00:00