Eric Harvey [Tue, 18 Jan 2022 20:55:10 +0000 (15:55 -0500)]
Fix potential overflow related issues spotted by LGTM code analysis (#1402)
Even Rouault [Tue, 18 Jan 2022 16:22:44 +0000 (17:22 +0100)]
Merge pull request #1401 from rouault/fix_1399
opj_j2k_setup_encoder(): validate number of tiles to avoid illegal values and potential overflow (fixes #1399)
Even Rouault [Tue, 18 Jan 2022 14:44:18 +0000 (15:44 +0100)]
opj_j2k_setup_encoder(): validate number of tiles to avoid illegal values and potential overflow (fixes #1399)
Eric Harvey [Sun, 16 Jan 2022 17:54:00 +0000 (12:54 -0500)]
Fix unsigned vs OPJ_INT32 mismatches (#1398)
Eharve14 [Sat, 15 Jan 2022 14:33:03 +0000 (09:33 -0500)]
Added check for integer overflow in get_num_images (#1397)
As discussed in pull request 1396, added a check for integer overflow.
Change list:
Defined num_images as unsigned int
Moved the if statement to check for an empty directory to the beginning of the read directory section
Added a check to see if num images would roll back to zero when incrementing.
Eharve14 [Thu, 13 Jan 2022 20:05:52 +0000 (15:05 -0500)]
Avoid overflow in multiplications in utilities related to big number of files in a directory (CVE-2021-29338) (#1396)
Brad Parham [Wed, 12 Jan 2022 12:46:10 +0000 (13:46 +0100)]
opj_compress/opj_uncompress: fix integer overflow in num_images (#1395)
Includes the fix for CVE-2021-29338
Credit to @kaniini based on #1346
Fixes #1338
Even Rouault [Fri, 10 Dec 2021 10:57:41 +0000 (11:57 +0100)]
Merge pull request #1392 from stweil/duplicate
Remove duplicate assignments in function tiftoimage
Stefan Weil [Fri, 10 Dec 2021 10:27:44 +0000 (11:27 +0100)]
Remove duplicate assignments in function tiftoimage
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Even Rouault [Sun, 5 Dec 2021 13:32:51 +0000 (14:32 +0100)]
Merge pull request #1390 from stweil/typos
Fix some typos (found by codespell)
Stefan Weil [Sun, 5 Dec 2021 12:38:47 +0000 (13:38 +0100)]
Format source file with typo fixes
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Stefan Weil [Sun, 5 Dec 2021 12:32:09 +0000 (13:32 +0100)]
Fix singular/plural mismatch
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Stefan Weil [Sun, 5 Dec 2021 12:04:30 +0000 (13:04 +0100)]
Fix some typos (found by codespell)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
msheby [Wed, 27 Oct 2021 12:10:50 +0000 (05:10 -0700)]
opj_compress: add a -TargetBitDepth switch for TIFF output (#1384)
Sometimes, given the same (16-bit TIF) input, one wants to generate a variety of J2C outputs (say, 16-, 12-, and 10-bit). This patch allows one to downsample input files, and so makes it easier to automate OpenJPEG in mass generation of J2Cs without having to pipe though an image processing program.
David Korczynski [Wed, 27 Oct 2021 10:10:11 +0000 (11:10 +0100)]
ci: Add CIFuzz action
Signed-off-by: David Korczynski <david@adalogics.com>
Even Rouault [Thu, 21 Oct 2021 15:21:36 +0000 (17:21 +0200)]
Merge pull request #1383 from rouault/deprecate_bpp
API: deprecate 'bpp' member in favor of 'prec'
Even Rouault [Thu, 21 Oct 2021 10:43:50 +0000 (12:43 +0200)]
API: deprecate 'bpp' member in favor of 'prec'
in opj_image_comp and opj_image_comptparm structures.
bpp was redundant with prec, and almost never set by the library, except
by opj_image_create(). This change should hopefully not impact existing,
working, users of the API, which should already have used prec to get
things working.
Fixes #1379
Even Rouault [Thu, 21 Oct 2021 11:12:05 +0000 (13:12 +0200)]
tests/: reformat a few files to be modified
Even Rouault [Mon, 27 Sep 2021 06:04:57 +0000 (08:04 +0200)]
tests/fuzzers/build_seed_corpus.sh: add htj2k files
Even Rouault [Sun, 26 Sep 2021 11:02:40 +0000 (13:02 +0200)]
Test decoding a .jhc file with vertically causal context variation
Even Rouault [Sun, 26 Sep 2021 10:49:05 +0000 (12:49 +0200)]
README.md: update badge to github action workflows [ci skip]
Even Rouault [Sun, 26 Sep 2021 10:41:05 +0000 (12:41 +0200)]
Test decoding a .jph test file
Even Rouault [Sun, 26 Sep 2021 10:37:59 +0000 (12:37 +0200)]
opj_dump.c: fix potential buffer overflow
Even Rouault [Sat, 25 Sep 2021 11:29:02 +0000 (13:29 +0200)]
Merge pull request #1381 from rouault/htj2k_followup
Added support for high throughput (HTJ2K) decoding.
Even Rouault [Sat, 25 Sep 2021 10:59:04 +0000 (12:59 +0200)]
ht_dec.c: fix likely issue on big endian hosts (untested)
Even Rouault [Sat, 25 Sep 2021 10:14:27 +0000 (12:14 +0200)]
opj_decompress / opj_dump: accept .jph and .jhc extensions for HTJ2K files
Aous Naman [Thu, 2 Sep 2021 08:51:38 +0000 (18:51 +1000)]
Added support for high throughput (HTJ2K) decoding.
There are a few limitations:
- mixed mode (HT and regular code blocks) is not supported.
- ROI in HT blocks is not supported.
- Placeholder passes are not supported.
- MultiHT sets are not support, only a singleHT set.
- there are known issues with some compliance testing files related to
the parsing of packet header.
Even Rouault [Wed, 15 Sep 2021 12:01:20 +0000 (14:01 +0200)]
Merge pull request #1380 from rouault/fix_verify_indent_pr
verify-indentation.sh: fix for pull request from bar/master to foo/master
Even Rouault [Wed, 15 Sep 2021 11:40:50 +0000 (13:40 +0200)]
CI 'regular': fix static builds when doing perf checks
Even Rouault [Wed, 15 Sep 2021 11:21:25 +0000 (13:21 +0200)]
verify-indentation.sh: fix for pull request from bar/master to foo/master
Even Rouault [Tue, 14 Sep 2021 15:15:53 +0000 (17:15 +0200)]
Merge pull request #1376 from rouault/gha
Port continuous integration to github actions
Jamaika1 [Sun, 12 Sep 2021 10:32:38 +0000 (12:32 +0200)]
Use standard integer types for compatibility with libtiff 4.3.0 (#1377)
Even Rouault [Sat, 11 Sep 2021 16:28:44 +0000 (18:28 +0200)]
appveyor.yml: disable deploy
Even Rouault [Fri, 10 Sep 2021 14:05:04 +0000 (16:05 +0200)]
Add github action workflows CI
Even Rouault [Wed, 8 Sep 2021 11:16:52 +0000 (13:16 +0200)]
Merge pull request #1375 from rouault/fix_ossfuzz_11700_30646
Avoid integer overflows in DWT.
Even Rouault [Fri, 3 Sep 2021 13:17:56 +0000 (15:17 +0200)]
Avoid integer overflows in DWT. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11700 and https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=30646
Even Rouault [Mon, 30 Aug 2021 17:15:32 +0000 (19:15 +0200)]
Merge pull request #1373 from DimitriPapadopoulos/lgtm
LGTM warning: Comparison result is always the same
Dimitri Papadopoulos [Mon, 30 Aug 2021 15:48:57 +0000 (18:48 +0300)]
LGTM warning: Comparison result is always the same
Comparison is always true because pos >= 0.
Even Rouault [Thu, 12 Aug 2021 09:42:28 +0000 (11:42 +0200)]
Merge pull request #1370 from madebr/cmake/export-include-directory
cmake: add install interface include directory
Even Rouault [Thu, 12 Aug 2021 09:40:40 +0000 (11:40 +0200)]
Merge pull request #1371 from DimitriPapadopoulos/codespell
A couple typos found by codespell
Dimitri Papadopoulos [Thu, 12 Aug 2021 09:12:22 +0000 (12:12 +0300)]
A couple typos found by codespell
Anonymous Maarten [Sun, 1 Aug 2021 18:56:40 +0000 (20:56 +0200)]
cmake: add install interface include directory
xiaoxiaoafeifei [Wed, 14 Jul 2021 01:35:13 +0000 (09:35 +0800)]
Fix segfault in src/bin/jp2/opj_decompress.c due to uninitialized pointer (fixes #1368) (#1369)
Even Rouault [Mon, 12 Jul 2021 13:59:41 +0000 (15:59 +0200)]
Fix code formatting
Even Rouault [Mon, 12 Jul 2021 13:58:06 +0000 (15:58 +0200)]
Merge pull request #1366 from sebras/fix-out-of-bounds-access
opj_j2k_is_imf_compliant: Fix out of bounds access
Sebastian Rasmussen [Mon, 12 Jul 2021 13:31:28 +0000 (15:31 +0200)]
opj_j2k_is_imf_compliant: Fix out of bounds access.
Previously when mainlevel was parsed == 12 openjpeg would generate
a warning, but then the sublevel value would be compared to an out
of bounds element in the tabMaxSubLevelFromMainLevel array. From
this commit OpenJPEG will only use mainlevel if in range.
Even Rouault [Mon, 12 Jul 2021 10:02:12 +0000 (12:02 +0200)]
Merge pull request #1365 from sebras/fix-warning-formatting
opj_j2k_is_imf_compliant: Fix argument formatting for warnings.
Sebastian Rasmussen [Mon, 12 Jul 2021 01:04:55 +0000 (03:04 +0200)]
opj_j2k_is_imf_compliant: Fix argument formatting for warnings.
Even Rouault [Wed, 9 Jun 2021 09:53:56 +0000 (11:53 +0200)]
Merge pull request #1361 from rouault/update_version_numbers_to_2_5
CMakeLists.txt/appveyor.yml: update version number to 2.5.0…
Even Rouault [Tue, 8 Jun 2021 12:34:43 +0000 (14:34 +0200)]
CMakeLists.txt/appveyor.yml: update version number to 2.5.0 to make it easier for downstream consumers to use new features
Even Rouault [Tue, 8 Jun 2021 09:11:04 +0000 (11:11 +0200)]
Merge pull request #1359 from rouault/TLM
Add support for enabling generation of TLM markers in encoder
Even Rouault [Mon, 7 Jun 2021 13:16:53 +0000 (15:16 +0200)]
Add support for enabling generation of TLM markers in encoder
Support was already there, but restricted to Cinema and IMF profiles,
and 255 tiles
* Add -TLM switch added to opj_compress
* Make opj_encoder_set_extra_options() function accept a TLM=YES option.
Even Rouault [Mon, 7 Jun 2021 13:48:42 +0000 (15:48 +0200)]
Merge pull request #1360 from rouault/travis_gcc_4_8_fix
.travis.yml: try to fix gcc 4.8 config by updating to xenial
Even Rouault [Mon, 7 Jun 2021 13:41:39 +0000 (15:41 +0200)]
.travis.yml: try to fix gcc 4.8 config by updating to xenial
Even Rouault [Mon, 7 Jun 2021 11:56:11 +0000 (13:56 +0200)]
Merge pull request #1358 from rouault/compiler_warning_fixes
Fix various compiler warnings
Even Rouault [Mon, 7 Jun 2021 11:28:26 +0000 (13:28 +0200)]
Fix various compiler warnings
Even Rouault [Mon, 7 Jun 2021 10:57:30 +0000 (12:57 +0200)]
openjpeg.c: avoid casts of function pointers
Even Rouault [Tue, 1 Jun 2021 20:59:11 +0000 (22:59 +0200)]
Merge pull request #1354 from msabwat/emscripten
fix #1345: don't remove big endian test for other platforms
Mehdi Sabwat [Tue, 1 Jun 2021 20:39:27 +0000 (22:39 +0200)]
fix #1345: don't remove big endian test for other platforms
thanks to @ePirat, it turns out that !EMSCRIPTEN does not evaluate to 1 on other platforms, so the the #1345 actually disabled the test for all platforms.
Even Rouault [Fri, 7 May 2021 09:22:13 +0000 (11:22 +0200)]
Merge pull request #1345 from msabwat/emscripten
emscripten: disable big endian test
Mehdi Sabwat [Mon, 26 Apr 2021 13:37:44 +0000 (15:37 +0200)]
emscripten: disable big endian test
This test should not run on the emscripten platform because of :
https://github.com/emscripten-core/emscripten/blob/
dff33368427fba16745c8ce52f11484a67b2855d/cmake/Modules/TestBigEndian.cmake#L5
Jamaika1 [Thu, 6 May 2021 17:30:34 +0000 (19:30 +0200)]
Import files tiff and yuv(raw) (#1316)
Even Rouault [Thu, 6 May 2021 11:40:43 +0000 (13:40 +0200)]
Merge pull request #1350 from rouault/remove_jpwl_jp3d_mj2
Remove obsolete components JPWL, JP3D and MJ2
Even Rouault [Tue, 4 May 2021 17:21:45 +0000 (19:21 +0200)]
Remove obsolete components JPWL, JP3D and MJ2
Even Rouault [Tue, 4 May 2021 17:15:06 +0000 (19:15 +0200)]
Merge pull request #1348 from rouault/fix_kdu
tools/travis-ci/install.sh: fix links to Kakadu and jpylyzer binaries
Even Rouault [Tue, 4 May 2021 16:55:43 +0000 (18:55 +0200)]
.travis.yml: disable tests that no longer pass for unknown reason
Even Rouault [Tue, 4 May 2021 14:27:05 +0000 (16:27 +0200)]
tools/travis-ci/install.sh: fix links to Kakadu and jpylyzer binaries
Even Rouault [Sun, 10 Jan 2021 22:58:37 +0000 (23:58 +0100)]
Merge pull request #1321 from ffontaine/master
Fix cmake file with DESTDIR
Fabrice Fontaine [Thu, 7 Jan 2021 13:11:26 +0000 (14:11 +0100)]
cmake/OpenJPEGConfig.cmake: replace ABSOLUTE by REALPATH
Fix #1174 by replacing ABSOLUTE by REALPATH which will resolve symlinks:
https://cmake.org/cmake/help/latest/command/get_filename_component.html
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Fabrice Fontaine [Thu, 7 Jan 2021 13:09:50 +0000 (14:09 +0100)]
Revert "Use INC_DIR for OPENJPEG_INCLUDE_DIRS (fixes uclouvain#1174)"
This reverts commit
65586374d639cfc0104419992f9022174b412594 which
breaks cross-compilation of poppler under buildroot (because of
DESTDIR usage).
Even Rouault [Mon, 4 Jan 2021 18:42:30 +0000 (19:42 +0100)]
Merge pull request #867 from pseiderer/fix-lcms2-static-linking-using-pgk-config
Fix lcms2 static linking using pgk config
Peter Seiderer [Fri, 11 Nov 2016 22:35:13 +0000 (23:35 +0100)]
thirdparty: lcms2: append flags found by pkg-config if available
This change allows to get all required CFLAGS/LDFLAGS in case of static only
build.
Fixes a buildroot build failure (see [1], [2] and [3]).
[1] http://autobuild.buildroot.net/results/5ce/
5cee20afd8bef5268832cddcb3a5270746be7a57
[2] http://lists.busybox.net/pipermail/buildroot/2016-November/177187.html
[3] http://lists.busybox.net/pipermail/buildroot/2016-November/177188.html
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
Depends on https://github.com/uclouvain/openjpeg/pull/866
Even Rouault [Mon, 4 Jan 2021 13:06:43 +0000 (14:06 +0100)]
Merge pull request #866 from tSed/master
fix static build only against tiff and its indirect dependencies
Even Rouault [Mon, 4 Jan 2021 09:45:52 +0000 (10:45 +0100)]
Merge pull request #1317 from ffontaine/master
CMakeLists.txt: Don't require a C++ compiler
Peter Korsgaard [Mon, 4 Jan 2021 08:05:42 +0000 (09:05 +0100)]
CMakeLists.txt: Don't require a C++ compiler
By default, CMake assumes that the project is using both C and C++. By
explicitly passing 'C' as argument of the project() macro, we tell CMake
that only C is used, which prevents CMake from erroring out if a C++
compiler doesn't exist.
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
[Retrieved (and slightly updated by adding enable_language(CXX) if
WITH_ASTYLE is set) from:
https://git.buildroot.net/buildroot/tree/package/openjpeg/0003-CMakeLists.txt-Don-t-require-a-C-compiler.patch]
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Even Rouault [Thu, 31 Dec 2020 13:54:59 +0000 (14:54 +0100)]
Fix Windows build
Antonin Descampe [Thu, 31 Dec 2020 10:06:28 +0000 (11:06 +0100)]
patch provided 3rdparty zlib to work with MacOS
Even Rouault [Tue, 29 Dec 2020 14:34:19 +0000 (15:34 +0100)]
Add HOWTO-RELEASE
Even Rouault [Tue, 29 Dec 2020 14:01:40 +0000 (15:01 +0100)]
Comment back opj_previous_version in abi_check.sh
Even Rouault [Tue, 29 Dec 2020 13:46:50 +0000 (14:46 +0100)]
abi_check.sh: Update version number for automatic abi check
Even Rouault [Mon, 28 Dec 2020 21:58:58 +0000 (22:58 +0100)]
Merge pull request #1312 from stweil/news
Fix year in NEWS
Stefan Weil [Mon, 28 Dec 2020 21:52:34 +0000 (22:52 +0100)]
Fix year in NEWS
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Even Rouault [Mon, 28 Dec 2020 20:55:55 +0000 (21:55 +0100)]
Prepare for v2.4.0
Even Rouault [Mon, 28 Dec 2020 20:49:48 +0000 (21:49 +0100)]
Merge pull request #1310 from Jamaika1/patch-1
Change defined WIN32
Even Rouault [Mon, 28 Dec 2020 18:05:14 +0000 (19:05 +0100)]
Merge pull request #1307 from cygwin-lem/pr_use-OPENJPEG_INSTALL_DOC_DIR-to-DESTINATION-of-HTMLs
Set ${OPENJPEG_INSTALL_DOC_DIR} to DESTINATION of HTMLs
Even Rouault [Mon, 28 Dec 2020 18:04:28 +0000 (19:04 +0100)]
Merge pull request #1308 from timgates42/bugfix_typo_produced
docs: fix simple typo, producted -> produced
Jamaika1 [Mon, 21 Dec 2020 06:59:12 +0000 (07:59 +0100)]
Change defined WIN32
Tim Gates [Wed, 16 Dec 2020 10:19:17 +0000 (21:19 +1100)]
docs: fix simple typo, producted -> produced
There is a small typo in thirdparty/include/zlib.h, thirdparty/libz/zlib.h.
Should read `produced` rather than `producted`.
Lemures Lemniscati [Mon, 14 Dec 2020 14:00:04 +0000 (23:00 +0900)]
Set ${OPENJPEG_INSTALL_DOC_DIR} to DESTINATION of HTMLs
Use ${OPENJPEG_INSTALL_DOC_DIR} as DESTINATION of HTML documents,
instead of share/doc.
Even Rouault [Thu, 10 Dec 2020 14:55:41 +0000 (15:55 +0100)]
Merge pull request #1306 from matthew-sharp/master
Use INC_DIR for OPENJPEG_INCLUDE_DIRS (fixes uclouvain#1174)
Matthew Sharp [Wed, 9 Dec 2020 23:17:46 +0000 (10:17 +1100)]
Use INC_DIR for OPENJPEG_INCLUDE_DIRS (fixes uclouvain#1174)
This fixes the case where the cmake file is accessed via a symlink.
Even Rouault [Sat, 5 Dec 2020 10:39:23 +0000 (11:39 +0100)]
Merge pull request #1304 from rouault/fix_1302
pi.c: avoid out of bounds access with POC (fixes #1302)
Even Rouault [Fri, 4 Dec 2020 19:45:25 +0000 (20:45 +0100)]
pi.c: avoid out of bounds access with POC (fixes #1302)
Even Rouault [Fri, 4 Dec 2020 19:37:43 +0000 (20:37 +0100)]
Merge pull request #1303 from zodf0055980/fix#1283
Encoder: grow again buffer size
yuan [Fri, 4 Dec 2020 11:00:22 +0000 (19:00 +0800)]
Encoder: grow again buffer size in opj_tcd_code_block_enc_allocate_data() (fixes #1283)
Even Rouault [Wed, 2 Dec 2020 22:56:57 +0000 (23:56 +0100)]
Merge pull request #1301 from rouault/fix_1299
opj_j2k_write_sod(): avoid potential heap buffer overflow (fixes #1299) (probably master only)
Even Rouault [Wed, 2 Dec 2020 22:56:39 +0000 (23:56 +0100)]
Merge pull request #1300 from rouault/complement_1293
pi.c: avoid out of bounds access with POC (refs https://github.com/uclouvain/openjpeg/issues/1293#issuecomment-
737122836)
Even Rouault [Wed, 2 Dec 2020 22:56:30 +0000 (23:56 +0100)]
Merge pull request #1298 from rouault/fix_1297
opj_t2_encode_packet(): avoid out of bound access of #1297, but likely not the proper fix
Even Rouault [Wed, 2 Dec 2020 13:10:16 +0000 (14:10 +0100)]
opj_j2k_write_sod(): avoid potential heap buffer overflow (fixes #1299) (probably master only)
Even Rouault [Wed, 2 Dec 2020 13:02:17 +0000 (14:02 +0100)]
pi.c: avoid out of bounds access with POC (refs https://github.com/uclouvain/openjpeg/issues/1293#issuecomment-
737122836)