diff options
author | Su_Laus <sulau@freenet.de> | 2022-08-25 16:11:41 +0200 |
---|---|---|
committer | Su_Laus <sulau@freenet.de> | 2022-08-25 16:31:26 +0200 |
commit | 4746f16253b784287bc8a5003990c1c3b9a03a62 (patch) | |
tree | 14276b809c0c0ae107e7353b7666a80cba669a7a /doc | |
parent | 48d6ece8389b01129e7d357f0985c8f938ce3da3 (diff) | |
download | libtiff-git-4746f16253b784287bc8a5003990c1c3b9a03a62.tar.gz |
tiffcrop: disable incompatibility of -Z, -X, -Y, -z options with any PAGE_MODE_x option (fixes #411 and #413)
tiffcrop does not support –Z, -z, -X and –Y options together with any other PAGE_MODE_x options like -H, -V, -P, -J, -K or –S.
Code analysis:
With the options –Z, -z, the crop.selections are set to a value > 0. Within main(), this triggers the call of processCropSelections(), which copies the sections from the read_buff into seg_buffs[].
In the following code in main(), the only supported step, where that seg_buffs are further handled are within an if-clause with if (page.mode == PAGE_MODE_NONE) .
Execution of the else-clause often leads to buffer-overflows.
Therefore, the above option combination is not supported and will be disabled to prevent those buffer-overflows.
The MR solves issues #411 and #413.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/tools/tiffcrop.rst | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/tools/tiffcrop.rst b/doc/tools/tiffcrop.rst index ee0d2d81..b5e8e744 100644 --- a/doc/tools/tiffcrop.rst +++ b/doc/tools/tiffcrop.rst @@ -415,6 +415,14 @@ Options Note: :program:`tiffcrop` may be compiled with :command:`-DDEVELMODE` to enable additional very low level debug reporting. +However, not all option combinations are permitted. + + Note 1: The (-X|-Y), -Z, -z and -S options are mutually exclusive. + In no case should the options be applied to a given selection successively. + + Note 2: Any of the -X, -Y, -Z and -z options together with other PAGE_MODE_x options + such as -H, -V, -P, -J or -K are not supported and may cause buffer overflows. + Examples -------- |