summaryrefslogtreecommitdiff
path: root/src/bin/jp2/convert.c
AgeCommit message (Collapse)Author
2021-10-21API: deprecate 'bpp' member in favor of 'prec'Even Rouault
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
2021-06-07Fix various compiler warningsEven Rouault
2020-04-01opj_decompress: add sanity checks to avoid segfault in case of decoding errorEven Rouault
Prevent crashes like: opj_decompress -i 0722_5-1_2019.jp2 -o out.ppm -r 4 -t 0 where 0722_5-1_2019.jp2 is https://drive.google.com/file/d/1ZxOUZg2-FKjYwa257VFLMpTXRWxEoP0a/view?usp=sharing
2018-11-07jp2: convert: fix null pointer dereferenceHugo Lefeuvre
Tile components in a JP2 image might have null data pointer by defining a zero component size (for example using large horizontal or vertical sampling periods). This null data pointer leads to null image component data pointer, causing crash when dereferenced without != null check in imagetopnm. Add != null check. This commit addresses #1152 (CVE-2018-18088).
2018-08-31Changes in pnmtoimage if image data are missingszukw000
2017-12-15Fix resource leak (CID 179466)Stefan Weil
Coverity report: CID 179466 (#1 of 1): Resource leak (RESOURCE_LEAK) 93. leaked_storage: Variable name going out of scope leaks the storage it points to. Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-08-24imagetopgx(): improve performance in 8 bit case (relates to broken.jpc test ↵Even Rouault
case)
2017-08-19pgxtoimage(): avoid excessive memory allocation attempt (#999)Even Rouault
2017-08-18pgxtoimage(): fix write stack buffer overflow (#997)Even Rouault
2017-08-17Fix -Wconversion warningEven Rouault
2017-08-17convert.c: fix recently introduced -Wsign-conversion warningsEven Rouault
2017-08-17tgatoimage(): avoid excessive memory allocation attempt, and fixes unaligned ↵Even Rouault
load (#995)
2017-08-16imagetotga(): fix read heap buffer overflow if numcomps < 3 (#987)Even Rouault
2017-07-31Catch images broken by AFLszukw000
2017-07-30Avoid heap buffer overflow in function pnmtoimage of convert.c, and unsigned ↵Even Rouault
integer overflow in opj_image_create() (CVE-2016-9118, #861)
2017-07-29Fix breakage of 2fa0fc61f2d546c8b67e7c5a9cbc61d98e1f7af0 (#970)Even Rouault
2017-07-29imagetopnm(): make sure the alpha component has same dimension as other ↵Even Rouault
components to avoid read heap buffer overflow (#970)
2017-05-09Reformat whole codebase with astyle.options (#128)Even Rouault
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-04-30Fix bad call to fclose with NULL pointermayeut
2016-04-29cppcheck fix for openjp2 (#740)julienmalik
2015-11-01Fix compiler warningsmayeut
2015-11-01convert: Fix compiler warningsStefan Weil
Fix this and other similar compiler warnings: src/bin/jp2/convert.c: In function ‘tga_readheader’: src/bin/jp2/convert.c:595:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] cmap_len = get_ushort(*(unsigned short*)(&tga[5])); Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-11-01convert: Remove unneeded type castsStefan Weil
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-10-18Fix format strings and unneeded assignmentStefan Weil
The static code analyzer cppcheck warns about unsigned integers which use "%d" in the format string. It also warns about an unneeded assignment. Fix both issues. Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-09-29Fix up-scaling bit depthmayeut
Fixes #609
2015-09-29Fix typos in comments and stringStefan Weil
Most typos were found by codespell. Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-09-24Fix some resource leaksmayeut
2015-09-23Use buffer on stack to read TGA headermayeut
Fixes a potential leak Fixes #601
2015-07-31Small correction + attempt to understand git-openjpeg workflowak-dxdy
2015-07-26Update convert for PNG outputmayeut
Update uclouvain/openjpeg#264
2015-07-26Remove some warnings when buildingmayeut
Update #442
2015-07-19Update PNG supportmayeut
Only input modified for now Update uclouvain/openjpeg#536 Update uclouvain/openjpeg#264
2015-07-14Update tiftoimage to support more input TIF formatsmayeut
Update uclouvain/openjpeg#322 Update uclouvain/openjpeg#264
2015-07-11Add option to force component splitting in imagetopnmmayeut
Update uclouvain/openjpeg#289
2015-07-03commented out printf lineAntonin Descampe
2015-07-03commented out a printf lineAntonin Descampe
2014-12-23[trunk] removed warning from convert.cMatthieu Darbois
Update issue 442
2014-12-23[trunk] fixed imagetoraw unsigned 16bits conversion (fixes issue 460)Matthieu Darbois
2014-12-22[trunk] fixed colorspace mapping for raw grayscale images (fixes issue 456)Matthieu Darbois
2014-12-22[trunk] fixed component precision upscaling in opj_decompress (fixes issue 458)Matthieu Darbois
2014-12-20[trunk] fixed BMP reading for 8bpp when width & 3 == 1Matthieu Darbois
Update issue 203
2014-12-11[trunk] Fixed invalid check in in tiff reading method (fixes issue 449)Matthieu Darbois
2014-11-25[trunk] removed some warnings when building src/bin/jp2/convert.cMatthieu Darbois
Update issue 442
2014-11-22[trunk] fixed pnmtoimage for odd pgm files (fixes issue 294)Matthieu Darbois
2014-11-19[trunk] added option to force output bit depth in opj_decompress (fixes ↵Matthieu Darbois
issue 283)
2014-11-03[trunk] add a cdef box when alpha component is present (fixes issue 416)Antonin Descampe
2014-09-16[trunk] improve memory management (fixes issue 359)Antonin Descampe
2014-07-03[trunk] fixes issue #357. MCT is automatically disabled whenAntonin Descampe
subsamppling is detected.
2014-04-17[trunk] refactoring of rsiz, profiles, and extensions managementAntonin Descampe