summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2016-09-26OPENJPEG_NAMESPACE is configurable by userMathieu Malaterre
2016-09-26Remove typos from comments and man pagesMathieu Malaterre
2016-09-22Fix PNM file reading (#847)Matthieu Darbois
Malformed PNM file could cause a crash in opj_compress. Checks were added to prevent this. Fixes #843 Updates #440
2016-09-22Fix some issues reported by Coverity Scan (#846)Stefan Weil
* test_tile_decoder: Fix potential buffer overflow (coverity) CID 1190155 (#1 of 1): Unbounded source buffer (STRING_SIZE) Using a pointer instead of buffer of fixed size avoids the limit for the length of the input file name. Signed-off-by: Stefan Weil <sw@weilnetz.de> * test_tile_encoder: Fix potential buffer overflow (coverity) CID 1190154 (#1 of 1): Unbounded source buffer (STRING_SIZE) Using a pointer instead of buffer of fixed size avoids the limit for the length of the output file name. This implies that the length can exceed 255, so the data type for variable len had to be fixed, too. Signed-off-by: Stefan Weil <sw@weilnetz.de> * openjpip: Initialize data before returning it This fixes an error reported by Coverity: CID 1190143 (#1 of 1): Uninitialized scalar variable (UNINIT) Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-09-21Fix potential out-of-bounds read (coverity) (#844)Stefan Weil
* query_parser: Fix potential out-of-bounds read (coverity) CID 1190207 (#1 of 1): Out-of-bounds read (OVERRUN) Variable i must be checked before testing query_param.box_type. Signed-off-by: Stefan Weil <sw@weilnetz.de> * jpip_parser: Fix potential out-of-bounds read (coverity) CID 1190206 (#1 of 1): Out-of-bounds read (OVERRUN) Variable i must be checked before testing query_param.box_type. Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-09-20Merge pull request #834 from trylab/issue833Antonin Descampe
Fix issue 833.
2016-09-20Disable automatic compilation of t1_generate_lutsAntonin Descampe
Fix #831
2016-09-16Fix warnings from recent overflow checksAntonin Descampe
see #832
2016-09-13Add overflow checks for opj_aligned_mallocmayeut
See https://pdfium.googlesource.com/pdfium/+/b20ab6c7acb3be1393461eb650ca8fa 4660c937e/third_party/libopenjpeg20/0020-opj_aligned_malloc.patch
2016-09-13Fix coverity 113065 (CWE-484) (#824)Matthieu Darbois
2016-09-13Cast to size_t before multiplicationMatthieu Darbois
Need to cast to size_t before multiplication otherwise overflow check is useless.
2016-09-13Add sanity check for tile coordinates (#823)Matthieu Darbois
Coordinates are casted from OPJ_UINT32 to OPJ_INT32 Add sanity check for negative values and upper bound becoming lower than lower bound. See also https://pdfium.googlesource.com/pdfium/+/b6befb2ed2485a3805cddea86dc7574510178ea9
2016-09-13fix incrementing of "l_tcp->m_nb_mcc_records" in opj_j2k_read_mcc (#820)Matthieu Darbois
2016-09-13Fix an integer overflow issue (#809)trylab
Prevent an integer overflow issue in function opj_pi_create_decode of pi.c.
2016-09-13Add overflow check in opj_tcd_init_tile (#819)Matthieu Darbois
2016-09-13Fix 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-09-13Add overflow check in opj_j2k_update_image_data (#817)Matthieu Darbois
2016-09-13Change 'restrict' define to 'OPJ_RESTRICT' (#816)Matthieu Darbois
Visual Studio 2015 does not pass regression tests with `__restrict` so kept disabled for MSVC. Need to check proper usage of OPJ_RESTRICT (if correct then there’s probably a bug in vc14) Closes #661
2016-09-13jpwl: Remove non-portable data type u_int16_t (fix issue #796) (#797)Stefan Weil
The type casts which used this data type can be removed by changing the signature of function swap16. As this function is called with unsigned variables, this change is reasonable. Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-09-13Fix dependency for pkg-config (issue #594) (#795)Stefan Weil
openjpeg provides libopenjp2.pc, so the require statements must refer to libopenjp2 instead of openjp2. Fixes #594 Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-06-21Update tcd.c (#790)maddin200
cppcheck unitialized variable
2016-05-10Update implementation of opj_calloc (#705)Stefan Weil
2016-05-10Add missing source for the JPIP library and executables (issue #658) (#659)Stefan Weil
They all need opj_malloc and other functions from opc_malloc.c. Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-05-08Fix Out-of-Bounds Access in function opj_tgt_resetmayeut
Fix uclouvain/openjpeg#775
2016-05-08Fix Heap Buffer Overflow in function color_cmyk_to_rgbmayeut
Fix uclouvain/openjpeg#774
2016-05-08Fix division by zeromayeut
Fix uclouvain/openjpeg#733
2016-05-02Use lowercase for cmake commands consistenlyJulien Malik
Inspired from https://github.com/InsightSoftwareConsortium/ITK/blob/master/Utilities/Maintenance/HowToCreateTheCMakeCaseConversion.txt This needs vim 7.3 and fails with vim 7.4 This also fixes a number of : - missing empty line at end of files - useless space at end of lines
2016-05-02Fix UBSan gcc warning for first arg to memset non nullJulien Malik
2016-04-30Merge pull request #706 from mayeut/issue135Antonin Descampe
Fix issue 135 The fix is legal regarding the standard but I did not manage to find out if it covers a bug in opj_t2_read_packet_data or if the file is corrupted
2016-04-30Fix some coverity warningsmayeut
2016-04-30Fix bad call to fclose with NULL pointermayeut
2016-04-30Fix warnings (#763)Matthieu Darbois
2016-04-30Fix Out-Of-Bounds Read in sycc42x_to_rgb function (#745)Matthieu Darbois
42x Images with an odd x0/y0 lead to subsampled component starting at the 2nd column/line. That is offset = comp->dx * comp->x0 - image->x0 = 1 Fix #726
2016-04-29Fix heap-buffer-overflow in color_esycc_to_rgb (#748)Matthieu Darbois
When all components do not have the same dx/dy, components buffer are read beyond their end. Do not convert in this case. Update uclouvain/openjpeg#725
2016-04-29cppcheck fix for openjp2 (#740)julienmalik
2016-04-28Check SSIZ is valid in opj_j2k_read_siz (#762)Matthieu Darbois
2016-04-28Fix unsigned int overflow reported by UBSan (#761)Matthieu Darbois
* Fix unsigned int overflow reported by UBSan Please add -DOPJ_UBSAN_BUILD to CFLAGS when building with -fsanitize=undefined,unsigned-integer-overflow It seems clang/gcc do not allow to disable checking for block of code other than function or file.
2016-04-28Fix implicit float-to-bool conversions (#752)julienmalik
2016-04-28Fix unsigned int overflow reported by UBSan (#759)Matthieu Darbois
2016-04-27Fix issue 135mayeut
dwt_interleave_h.gsr105.jp2 now has the same output as kakadu issue399 is corrupted. Only the corrupted part changes. Update known failures for x86 MD5 NR-DEC-kodak_2layers_lrcp.j2c-31-decode-md5 NR-DEC-kodak_2layers_lrcp.j2c-32-decode-md5 NR-DEC-issue135.j2k-68-decode-md5
2016-04-27Fix negative shift left reported by UBSan (#758)Matthieu Darbois
Follow-up of #757 This shall have no performance impact on 2’s complement machine where the compiler replaces the multiplication by power of two (constant) by a left shift. Verified at least on MacOS Xcode 7.3, same assembly generated after fix.
2016-04-26Remove whitespace and CR at line endings (#678)Stefan Weil
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-04-26Fix negative shift left reported by UBSan (#757)Matthieu Darbois
This shall have no performance impact on 2’s complement machine where the compiler replaces the multiplication by power of two (constant) by a left shift. Verified at least on MacOS Xcode 7.3, same assembly generated after fix.
2016-04-23Do not define __attribute__ in opj_includes.h (#751)Matthieu Darbois
Fix #727
2016-04-23Allow to write 3/5/7/9/11/13/15 bpp TIF filesmayeut
Update uclouvain/openjpeg#729
2016-04-23Allow to read 3/5/7/9/11/13/15 bpp TIF filesmayeut
2016-04-18Merge pull request #708 from GrokImageCompression/issue_695Antonin Descampe
issue #695 MQ Encode: ensure that bp pointer never points to uninitialized memory
2016-04-12Merge pull request #734 from senbox-org/opj_dump_dead_codeAntonin Descampe
Remove dead code in opj_dump
2016-04-09Fix uninitialized variable reported by cppcheckJulien Malik
Also reorder initialization to follow declaration order
2016-04-09Remove dead code in opj_dumpJulien Malik