mirror of
https://gitlab.com/libtiff/libtiff.git
synced 2026-10-24 19:59:18 +03:00
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.