Skip to content
Snippets Groups Projects
  1. Oct 13, 2022
  2. Oct 12, 2022
  3. Oct 10, 2022
  4. Oct 08, 2022
  5. Oct 07, 2022
  6. Oct 06, 2022
    • Even Rouault's avatar
      Merge branch 'rational_precision2double_coverity-fix' into 'master' · f21ecf4a
      Even Rouault authored
      rational_precision2double.c: Fix issue from Coverity Scan.
      
      See merge request !395
      f21ecf4a
    • Su Laus's avatar
      692870df
    • Even Rouault's avatar
      Merge branch 'fix-455_Improved-IFD-loop-handling' into 'master' · d093eb5d
      Even Rouault authored
      Improved IFD-Loop Handling (fixes #455)
      
      Closes #455
      
      See merge request !386
      d093eb5d
    • Su Laus's avatar
      Improved IFD-Loop Handling (fixes #455) · c7caec9a
      Su Laus authored and Even Rouault's avatar Even Rouault committed
      IFD infinite looping was not fixed by MR 20 (see #455).
      An improved IFD loop handling is proposed.
      
      Basic approach:
      
      - The order in the entire chain must be checked, and not only whether an offset has already been read once.
      - To do this, pairs of directory number and offset are stored and checked.
      - The offset of a directory number can change.
      - TIFFAdvanceDirectory() must also perform an IFD loop check.
      - TIFFCheckDirOffset() is replaced by _TIFFCheckDirNumberAndOffset().
      
      Rules for the check:
      
      - If an offset is already in the list, it must have the same IFD number. Otherwise it is an IDF loop.
      - If the offset is not in the list and the IFD number is greater than there are list entries, a new list entry is added.
      - Otherwise, the offset of the IFD number is updated.
      
      Reference is also made to old bugzilla bug 2772 and MR 20, which did not solve the general issue.
      This MR closes #455
      c7caec9a
  7. Oct 05, 2022
  8. Oct 04, 2022
  9. Oct 03, 2022
    • Jeremy Maitin-Shepard's avatar
      Fix CMake build to be compatible with FetchContent · 814a2441
      Jeremy Maitin-Shepard authored
      Recent versions of CMake have improved support for including
      dependencies, using the FetchContent module, which allows a dependency
      to be imported as a subproject and then later found automatically by
      calls to `find_package`.
      
      This change makes libtiff's CMake better behaved when used as a
      sub-project:
      
      - CMake has a single global namespace for all target names in all
        sub-projects.  This commit renames the following CMake targets:
      
        - port -> tiff_port
        - mkg3states -> tiff_mkg3states
        - faxtable -> tiff_faxtable
        - release -> tiff_release
      
      - When building TIFF as a sub-project, it is not normally useful to
        create install rules for its targets.  This commit adds a
        `tiff-install` option that controls whether the install rules are
        added and defaults to OFF when libtiff is included as a sub-project.
      
      - Previously, libtiff set `BUILD_SHARED_LIBS` to ON by default.  With
        this commit, that default is only set if libtiff is the top-level
        project.
      
      - When using `find_package(TIFF)`, the targets `TIFF::TIFF` and
        `TIFF::CXX` are defined.  This commit makes libtiff itself define
        those targets as aliases, to allow other cmake projects to use
        either `find_package` or `FetchContent` interchangeably.
      
      - Adds ZSTD_HAVE_DECOMPRESS_STREAM variable which may be set to bypass
        `check_symbol_exists` call.  Fixes
        #472.
      814a2441
  10. Sep 27, 2022
  11. Sep 26, 2022
  12. Sep 16, 2022
  13. Sep 08, 2022
  14. Aug 30, 2022
    • Su Laus's avatar
      Revised handling of TIFFTAG_INKNAMES and related TIFFTAG_NUMBEROFINKS value · f00484b9
      Su Laus authored
      In order to solve the buffer overflow issues related to TIFFTAG_INKNAMES and related TIFFTAG_NUMBEROFINKS value, a revised handling of those tags within LibTiff is proposed:
      
      Behaviour for writing:
          `NumberOfInks`  MUST fit to the number of inks in the `InkNames` string.
          `NumberOfInks` is automatically set when `InkNames` is set.
          If `NumberOfInks` is different to the number of inks within `InkNames` string, that will be corrected and a warning is issued.
          If `NumberOfInks` is not equal to samplesperpixel only a warning will be issued.
      
      Behaviour for reading:
          When reading `InkNames` from a TIFF file, the `NumberOfInks` will be set automatically to the number of inks in `InkNames` string.
          If `NumberOfInks` is different to the number of inks within `InkNames` string, that will be corrected and a warning is issued.
          If  `NumberOfInks` is not equal to samplesperpixel only a warning will be issued.
      
      This allows the safe use of the NumberOfInks value to read out the InkNames without buffer overflow
      
      This MR will close the following issues:  #149, #150, #152, #168 (to be checked), #250, #269, #398 and #456.
      
      It also fixes the old bug at http://bugzilla.maptools.org/show_bug.cgi?id=2599, for which the limitation of `NumberOfInks = SPP` was introduced, which is in my opinion not necessary and does not solve the general issue.
      f00484b9
  15. Aug 25, 2022
    • Su Laus's avatar
      tiffcrop: disable incompatibility of -Z, -X, -Y, -z options with any... · 4746f162
      Su Laus authored
      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.
      4746f162
  16. Aug 21, 2022
  17. Aug 20, 2022
  18. Aug 16, 2022
  19. Aug 15, 2022
  20. Aug 09, 2022
Loading