commit f70e352429e3b565262251b1150e77e8638bed6c
Author: Albert Astals Cid <aacid@kde.org>
Date:   Thu Sep 2 00:04:17 2021 +0200

    21.09.0

 CMakeLists.txt   |  4 ++--
 NEWS             | 12 ++++++++++++
 cpp/Doxyfile     |  2 +-
 qt5/src/Doxyfile |  2 +-
 qt6/src/Doxyfile |  2 +-
 5 files changed, 17 insertions(+), 5 deletions(-)

commit 3cbd833a560eaa8f2d284c3de2033247777b2e6a
Author: Albert Astals Cid <aacid@kde.org>
Date:   Tue Aug 31 00:15:51 2021 +0200

    Remove unused SplashPath::copy

 splash/SplashPath.cc | 18 ------------------
 splash/SplashPath.h  |  5 -----
 2 files changed, 23 deletions(-)

commit f8bcfde24f52e66dd98b8ae62057742bd3add35e
Author: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Date:   Tue Jul 13 15:16:31 2021 +0100

    cmake: correctly forward user-provided flags to try_compile()

    Poppler overrides the user-provided CMAKE_{C,CXX}_FLAGS and appends
    them
    to the per-configuration variables instead. This behaviour currently
    causes cross-compilation checks to fail since a CMake issue means
    these
    these per-configuration flags are no passed to try_compile() commands.
    In my case the flags specified in the toolchain file (as part of
    CMAKE_{C,CXX}_FLAGS_INIT) are absolutely required to compile
    successfully
    since a missing `-mabi=/-march=` flag will result in a linker error
    due to
    trying to link incompatible libraries. If
    CMAKE_TRY_COMPILE_CONFIGURATION
    is empty CMake will no propagate the per-configuration flags to
    try_compile() so we have to to set the value explicitly.

    This is an upstream CMake issue:
    See https://gitlab.kitware.com/cmake/cmake/-/issues/22414 and
    https://gitlab.kitware.com/cmake/cmake/-/issues/19512.

 CMakeLists.txt | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

commit 53ecbfc9af7a490ad49353b1e2b5011a66c0f100
Author: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Date:   Tue Jul 13 15:04:36 2021 +0100

    Always append to CMAKE_{C,CXX}_FLAGS_${CMAKE_BUILD_TYPE}

    Currently the user/toolchain-provided CMAKE_{C,CXX}_FLAGS can be lost
    if the user selects a CMAKE_BUILD_TYPE that is not handled by
    PopplerMacros.cmake. To avoid this problem use a foreach() loop over
    all known build types plus the current CMAKE_BUILD_TYPE that appends
    to the per-configuration flags.

 cmake/modules/PopplerMacros.cmake | 87
 +++++++++++++++++++++++----------------
 1 file changed, 52 insertions(+), 35 deletions(-)

commit a1678b91e2d1b1b38ff38897bc1540f2b57a7ebc
Author: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Date:   Mon Jul 12 17:44:07 2021 +0100

    Call cmake_minium_required() before project()

    See CMake documentation:
    ```
    Call the cmake_minimum_required() command at the beginning of the
    top-level
    CMakeLists.txt file even before calling the project() command. It is
    important to establish version and policy settings before invoking
    other
    commands whose behavior they may affect. See also policy CMP0000.
    ```

 CMakeLists.txt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

commit e8003bd8cde3b4b6b2954ad7370d3ece71607673
Author: Albert Astals Cid <aacid@kde.org>
Date:   Sun Aug 29 22:51:06 2021 +0200

    Update (C)

 goo/JpegWriter.cc          | 1 +
 poppler/StdinCachedFile.cc | 1 +
 poppler/TextOutputDev.cc   | 1 +
 utils/pdftocairo.cc        | 1 +
 utils/pdftoppm.cc          | 1 +
 5 files changed, 5 insertions(+)

commit e2183097ad35038bb7266f181578020edf7cd08d
Author: Peter Williams <peter@newton.cx>
Date:   Wed Aug 18 10:39:21 2021 -0400

    Fix up setmode calls

    To compile and work correctly on both Cygwin and MSVC, we should
    always
    call the function `_setmode` and check for either `_WIN32` or
    `__CYGWIN__` being defined. This fixes the MSVC build and corrects
    some
    behavior handling output to stdout on Cygwin.

 poppler/StdinCachedFile.cc |  8 ++++----
 poppler/TextOutputDev.cc   |  8 ++++----
 utils/pdftocairo.cc        | 14 ++++++++++----
 utils/pdftoppm.cc          |  8 ++++----
 4 files changed, 22 insertions(+), 16 deletions(-)

commit db9aa98fb14f3e88f8ab9fd6fc5043a45ccba3fd
Author: Peter Williams <peter@newton.cx>
Date:   Wed Aug 18 10:38:11 2021 -0400

    Map str{n,}casecmp to supported names on MSVC

 config.h.cmake | 2 ++
 1 file changed, 2 insertions(+)

commit e5cfc6977f716c4d42df4598cdd958fd865ed1a0
Author: Peter Williams <peter@newton.cx>
Date:   Wed Aug 18 10:36:54 2021 -0400

    JpegWriter: include poppler/Error.h sooner

    This is needed to avoid a symbol redefinition error on Windows/MSVC.

 goo/JpegWriter.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

commit 6aff5bbbfe06c70314ba7ea936d98aed0e48331f
Author: Albert Astals Cid <aacid@kde.org>
Date:   Sat Aug 21 21:46:00 2021 +0200

    CI: Enable google-explicit-constructor

    I was doing some refactoring before and was hit by one of the
    constructors being magically called when i didn't want that.

    Since we don't really on it (was just used in some of the explicit
    type
    conversions) I think it makes sense to enable

    And 2 small qt6 clang-tidy fixes because we don't have qt6 on
    the clang-tidy CI yet

    There's 2 potentially source incompatible changes in the qt frontend,
    but i really really hope noone was using the constructors that way

 .gitlab-ci.yml                               |  2 +-
 cpp/poppler-destination.h                    |  4 +-
 cpp/poppler-document.h                       |  4 +-
 cpp/poppler-embedded-file-private.h          |  4 +-
 cpp/poppler-embedded-file.h                  |  3 +-
 cpp/poppler-font-private.h                   |  3 +-
 cpp/poppler-font.h                           |  3 +-
 cpp/poppler-global.cpp                       | 12 +++---
 cpp/poppler-global.h                         |  5 ++-
 cpp/poppler-image.cpp                        |  4 +-
 cpp/poppler-page-transition.cpp              |  4 +-
 cpp/poppler-page-transition.h                |  3 +-
 cpp/poppler-page.h                           |  4 +-
 fofi/FoFiIdentifier.cc                       |  4 +-
 goo/JpegWriter.h                             |  4 +-
 goo/NetPBMWriter.h                           |  4 +-
 goo/PNGWriter.h                              |  4 +-
 goo/TiffWriter.h                             |  4 +-
 goo/gdir.h                                   |  4 +-
 goo/gfile.h                                  |  4 +-
 poppler/Annot.h                              | 38 +++++++++---------
 poppler/Array.h                              |  4 +-
 poppler/CairoFontEngine.cc                   | 14 ++++---
 poppler/CairoFontEngine.h                    |  4 +-
 poppler/Catalog.h                            |  2 +-
 poppler/CharCodeToUnicode.h                  |  4 +-
 poppler/Dict.h                               |  6 +--
 poppler/FileSpec.h                           |  6 +--
 poppler/FlateEncoder.h                       |  2 +-
 poppler/FontInfo.h                           |  4 +-
 poppler/Function.h                           | 12 +++---
 poppler/Gfx.cc                               |  2 +-
 poppler/GfxState.cc                          |  2 +-
 poppler/GfxState.h                           | 24 +++++------
 poppler/GlobalParams.h                       |  6 +--
 poppler/Hints.cc                             |  4 +-
 poppler/JArithmeticDecoder.h                 |  4 +-
 poppler/JBIG2Stream.cc                       |  4 +-
 poppler/JPEG2000Stream.h                     |  2 +-
 poppler/JSInfo.h                             |  4 +-
 poppler/Linearization.h                      |  4 +-
 poppler/Link.h                               | 30 +++++++-------
 poppler/MarkedContentOutputDev.h             |  4 +-
 poppler/Movie.h                              |  4 +-
 poppler/OptionalContent.h                    |  6 +--
 poppler/PDFDoc.h                             |  4 +-
 poppler/PDFDocFactory.h                      |  4 +-
 poppler/PageTransition.h                     |  4 +-
 poppler/PopplerCache.h                       |  4 +-
 poppler/PreScanOutputDev.h                   |  2 +-
 poppler/Rendition.h                          |  4 +-
 poppler/SecurityHandler.h                    |  4 +-
 poppler/Sound.h                              |  4 +-
 poppler/SplashOutputDev.cc                   |  2 +-
 poppler/Stream.cc                            |  2 +-
 poppler/Stream.h                             | 24 +++++------
 poppler/StructElement.h                      |  6 +--
 poppler/TextOutputDev.cc                     |  4 +-
 poppler/TextOutputDev.h                      |  8 ++--
 poppler/UnicodeMap.h                         |  4 +-
 poppler/ViewerPreferences.h                  |  3 +-
 poppler/XRef.h                               |  6 +--
 qt5/demos/abstractinfodock.h                 |  3 +-
 qt5/demos/embeddedfiles.h                    |  3 +-
 qt5/demos/fonts.h                            |  3 +-
 qt5/demos/info.h                             |  3 +-
 qt5/demos/metadata.h                         |  3 +-
 qt5/demos/navigationtoolbar.h                |  4 +-
 qt5/demos/optcontent.h                       |  3 +-
 qt5/demos/pageview.h                         |  3 +-
 qt5/demos/permissions.h                      |  3 +-
 qt5/demos/thumbnails.h                       |  3 +-
 qt5/demos/toc.h                              |  4 +-
 qt5/demos/viewer.h                           |  3 +-
 qt5/src/QPainterOutputDev.h                  |  4 +-
 qt5/src/poppler-annotation.h                 | 60
 ++++++++++++++--------------
 qt5/src/poppler-embeddedfile-private.h       |  4 +-
 qt5/src/poppler-form.cc                      |  4 +-
 qt5/src/poppler-form.h                       | 10 ++---
 qt5/src/poppler-link-extractor-private.h     |  3 +-
 qt5/src/poppler-link-private.h               |  4 +-
 qt5/src/poppler-link.cc                      | 14 +++----
 qt5/src/poppler-link.h                       | 14 +++----
 qt5/src/poppler-media.cc                     |  4 +-
 qt5/src/poppler-media.h                      |  4 +-
 qt5/src/poppler-optcontent-private.h         |  6 +--
 qt5/src/poppler-optcontent.h                 |  4 +-
 qt5/src/poppler-page-transition.cc           |  4 +-
 qt5/src/poppler-page-transition.h            |  4 +-
 qt5/src/poppler-private.h                    |  4 +-
 qt5/src/poppler-qiodeviceoutstream-private.h |  3 +-
 qt5/src/poppler-qt5.h                        | 20 +++++-----
 qt5/tests/check_actualtext.cpp               |  2 +-
 qt5/tests/check_annotations.cpp              |  2 +-
 qt5/tests/check_attachments.cpp              |  2 +-
 qt5/tests/check_dateConversion.cpp           |  2 +-
 qt5/tests/check_fonts.cpp                    |  2 +-
 qt5/tests/check_forms.cpp                    |  4 +-
 qt5/tests/check_goostring.cpp                |  2 +-
 qt5/tests/check_internal_outline.cpp         |  2 +-
 qt5/tests/check_lexer.cpp                    |  2 +-
 qt5/tests/check_links.cpp                    |  2 +-
 qt5/tests/check_metadata.cpp                 |  2 +-
 qt5/tests/check_object.cpp                   |  2 +-
 qt5/tests/check_optcontent.cpp               |  2 +-
 qt5/tests/check_outline.cpp                  |  2 +-
 qt5/tests/check_pagelabelinfo.cpp            |  2 +-
 qt5/tests/check_pagelayout.cpp               |  2 +-
 qt5/tests/check_pagemode.cpp                 |  2 +-
 qt5/tests/check_password.cpp                 |  2 +-
 qt5/tests/check_permissions.cpp              |  2 +-
 qt5/tests/check_search.cpp                   |  2 +-
 qt5/tests/check_strings.cpp                  |  2 +-
 qt5/tests/check_stroke_opacity.cpp           |  2 +-
 qt5/tests/check_utf_conversion.cpp           |  2 +-
 qt5/tests/stress-threads-qt5.cpp             |  2 +-
 qt5/tests/test-password-qt5.cpp              |  2 +-
 qt6/demos/abstractinfodock.h                 |  3 +-
 qt6/demos/embeddedfiles.h                    |  3 +-
 qt6/demos/fonts.h                            |  3 +-
 qt6/demos/info.h                             |  3 +-
 qt6/demos/metadata.h                         |  3 +-
 qt6/demos/navigationtoolbar.h                |  4 +-
 qt6/demos/optcontent.h                       |  3 +-
 qt6/demos/pageview.h                         |  3 +-
 qt6/demos/permissions.h                      |  3 +-
 qt6/demos/thumbnails.h                       |  3 +-
 qt6/demos/toc.h                              |  4 +-
 qt6/demos/viewer.h                           |  3 +-
 qt6/src/QPainterOutputDev.h                  |  4 +-
 qt6/src/poppler-annotation.h                 | 36 ++++++++---------
 qt6/src/poppler-embeddedfile-private.h       |  4 +-
 qt6/src/poppler-form.cc                      |  4 +-
 qt6/src/poppler-form.h                       | 10 ++---
 qt6/src/poppler-link-extractor-private.h     |  3 +-
 qt6/src/poppler-link-private.h               |  4 +-
 qt6/src/poppler-link.cc                      | 12 +++---
 qt6/src/poppler-link.h                       | 14 +++----
 qt6/src/poppler-media.cc                     |  4 +-
 qt6/src/poppler-media.h                      |  4 +-
 qt6/src/poppler-optcontent-private.h         |  6 +--
 qt6/src/poppler-optcontent.h                 |  4 +-
 qt6/src/poppler-page-transition.cc           |  4 +-
 qt6/src/poppler-page-transition.h            |  4 +-
 qt6/src/poppler-private.h                    |  4 +-
 qt6/src/poppler-qiodeviceoutstream-private.h |  3 +-
 qt6/src/poppler-qt6.h                        | 20 +++++-----
 qt6/tests/check_actualtext.cpp               |  2 +-
 qt6/tests/check_annotations.cpp              |  2 +-
 qt6/tests/check_attachments.cpp              |  2 +-
 qt6/tests/check_dateConversion.cpp           |  2 +-
 qt6/tests/check_fonts.cpp                    |  2 +-
 qt6/tests/check_forms.cpp                    |  4 +-
 qt6/tests/check_goostring.cpp                |  2 +-
 qt6/tests/check_internal_outline.cpp         |  2 +-
 qt6/tests/check_lexer.cpp                    |  2 +-
 qt6/tests/check_links.cpp                    |  2 +-
 qt6/tests/check_metadata.cpp                 |  2 +-
 qt6/tests/check_object.cpp                   |  2 +-
 qt6/tests/check_optcontent.cpp               |  2 +-
 qt6/tests/check_outline.cpp                  |  2 +-
 qt6/tests/check_pagelabelinfo.cpp            |  2 +-
 qt6/tests/check_pagelayout.cpp               |  2 +-
 qt6/tests/check_pagemode.cpp                 |  2 +-
 qt6/tests/check_password.cpp                 |  2 +-
 qt6/tests/check_permissions.cpp              |  2 +-
 qt6/tests/check_search.cpp                   |  2 +-
 qt6/tests/check_strings.cpp                  |  2 +-
 qt6/tests/check_stroke_opacity.cpp           |  2 +-
 qt6/tests/check_utf_conversion.cpp           |  2 +-
 qt6/tests/stress-threads-qt6.cpp             |  2 +-
 qt6/tests/test-password-qt6.cpp              |  2 +-
 splash/SplashClip.h                          |  2 +-
 splash/SplashPath.h                          |  2 +-
 splash/SplashPattern.h                       |  2 +-
 splash/SplashScreen.h                        |  4 +-
 splash/SplashState.h                         |  2 +-
 utils/HtmlOutputDev.h                        |  4 +-
 178 files changed, 456 insertions(+), 422 deletions(-)

commit 646a1519d965895a4126b4e5f6fee2102d9c38a6
Author: Albert Astals Cid <aacid@kde.org>
Date:   Fri Aug 27 15:45:27 2021 +0200

    CI: Include qt6 on the clang-tidy and clazy builders

 .gitlab-ci.yml            | 12 ++++++++++--
 qt6/src/poppler-link.cc   |  2 +-
 qt6/src/poppler-page.cc   |  2 +-
 qt6/src/poppler-private.h |  1 -
 4 files changed, 12 insertions(+), 5 deletions(-)

commit 875be6054ff85261e254268a77cf47ebb9c539e9
Author: Albert Astals Cid <aacid@kde.org>
Date:   Fri Aug 27 13:33:05 2021 +0200

    SplashClip: we don't need to keep the paths around

    Since we never used them for anything ^_^

    Saves yet another 40% in file from issue #1126

 splash/Splash.cc             |  6 +++---
 splash/SplashClip.cc         | 45
 ++++++++++++--------------------------------
 splash/SplashClip.h          |  1 -
 splash/SplashXPath.cc        |  8 --------
 splash/SplashXPath.h         |  4 ----
 splash/SplashXPathScanner.cc | 20 ++++++++++----------
 splash/SplashXPathScanner.h  |  4 ++--
 7 files changed, 27 insertions(+), 61 deletions(-)

commit 849e4bbbdcffe8c7ec4fe319f7cf1fbbd8c84949
Author: Albert Astals Cid <aacid@kde.org>
Date:   Fri Aug 27 02:12:27 2021 +0200

    Splash: huge speed improvement in save/restore heavy files

    27 secs to 2 secs in file from issue #1126 in my computer

    When copying the SplashClip we don't need to copy the scanners, we can
    just share the same pointers since once created the scanners can't
    change.

 splash/SplashClip.cc         | 13 +++----------
 splash/SplashClip.h          |  5 ++++-
 splash/SplashXPathScanner.cc | 11 -----------
 splash/SplashXPathScanner.h  |  6 ------
 4 files changed, 7 insertions(+), 28 deletions(-)

commit 0f78fc2fc29463af7340fa5c7efac6f82dbba26b
Author: Albert Astals Cid <aacid@kde.org>
Date:   Fri Aug 27 02:02:52 2021 +0200

    Every function in SplashXPathScanner is const

 splash/SplashXPathScanner.cc | 12 ++++++------
 splash/SplashXPathScanner.h  | 16 ++++++++--------
 2 files changed, 14 insertions(+), 14 deletions(-)

commit d6c4d5d98f016d552c54bc86c42883d660adb70c
Author: Albert Astals Cid <aacid@kde.org>
Date:   Fri Aug 27 02:01:05 2021 +0200

    SplashXPathScanner: Don't keep the SplashXPath around

    we don't need it

 splash/SplashXPathScanner.cc | 8 +++-----
 splash/SplashXPathScanner.h  | 5 ++---
 2 files changed, 5 insertions(+), 8 deletions(-)

commit f39941016fcd5af3c510112e9224c2c19c504ef4
Author: Albert Astals Cid <aacid@kde.org>
Date:   Fri Aug 27 00:57:49 2021 +0200

    Update (C)

 poppler/SplashOutputDev.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit f51d2519590369107c27d0f3a078819e1df889fb
Author: Even Rouault <even.rouault@spatialys.com>
Date:   Wed Aug 25 21:52:26 2021 +0200

    SplashOutputDev::drawImage(): Fix abort() in failed gmallocn

    Fail following crash on reproducer test case of
    https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=27810

    Crash stack on ``pdftoppm -png
    clusterfuzz-testcase-minimized-gdal_fuzzer-5753490332450816.fuzz`` is:
    ```
    0  __GI_raise (sig=sig@entry=6) at
    ../sysdeps/unix/sysv/linux/raise.c:50
    1  0x00007ffff7746859 in __GI_abort () at abort.c:79
    2  0x00007ffff7cff44e in gmallocn (count=count@entry=1073741824,
    size=size@entry=3, checkoverflow=checkoverflow@entry=false) at
    /home/even/poppler/goo/gmem.h:116
    3  0x00007ffff7e584d4 in SplashOutputDev::drawImage
    (this=0x5555555b6b00, state=0x5555555bb360, ref=<optimized
    out>, str=0x5555555dc6e0, width=19, height=<optimized out>,
    colorMap=0x7fffffffd2c0,
       interpolate=false, maskColors=0x0, inlineImg=false) at
       /home/even/poppler/poppler/SplashOutputDev.cc:3286
    4  0x00007ffff7d764a6 in Gfx::doImage
    (this=this@entry=0x5555555b9460, ref=ref@entry=0x7fffffffd820,
    str=<optimized out>, inlineImg=inlineImg@entry=false) at
    /home/even/poppler/poppler/Gfx.cc:4563
    5  0x00007ffff7d773ca in Gfx::opXObject (this=0x5555555b9460,
    args=<optimized out>, numArgs=<optimized out>) at
    /home/even/poppler/poppler/Gfx.cc:4105
    6  0x00007ffff7d70dc7 in Gfx::go (this=this@entry=0x5555555b9460,
    topLevel=topLevel@entry=true) at /home/even/poppler/poppler/Gfx.cc:681
      0x00007ffff7d711f5 in Gfx::display (this=this@entry=0x5555555b9460,
      obj=obj@entry=0x7fffffffdc00, topLevel=topLevel@entry=true)
      at /home/even/poppler/poppler/Gfx.cc:642
    8  0x00007ffff7dd2758 in Page::displaySlice (this=0x5555555b5ff0,
    out=0x5555555b6b00, hDPI=<optimized out>, vDPI=<optimized out>,
    rotate=<optimized out>, useMediaBox=<optimized out>,
       crop=<optimized out>, sliceX=<optimized out>, sliceY=0,
       sliceW=230, sliceH=230, printing=false, abortCheckCbk=0x0,
       abortCheckCbkData=0x0,
       annotDisplayDecideCbk=0x55555555a110 <<lambda(Annot*,
       void*)>::_FUN(Annot *, void *)>, annotDisplayDecideCbkData=0x0,
       copyXRef=false) at /home/even/poppler/poppler/Page.cc:576
    9  0x000055555555a633 in savePageSlice (doc=<optimized out>,
    splashOut=0x5555555b6b00, pg=1, x=<optimized out>, y=<optimized out>,
    w=<optimized out>, h=<optimized out>, pg_w=<optimized out>,
       pg_h=<optimized out>, ppmFile=0x0) at
       /home/even/poppler/utils/pdftoppm.cc:288
    10 0x0000555555559232 in main (argc=<optimized out>, argv=<optimized
    out>) at /home/even/poppler/utils/pdftoppm.cc:684
    ```

 poppler/SplashOutputDev.cc | 70
 ++++++++++++++++++++++++++--------------------
 1 file changed, 39 insertions(+), 31 deletions(-)

commit c92e079ea2954abc6b7005a802ea464ccfae9581
Author: Albert Astals Cid <aacid@kde.org>
Date:   Thu Aug 26 01:10:26 2021 +0200

    Update (C)

 poppler/JBIG2Stream.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit 63c052ec2d4286560075c857261518089c92c315
Author: Georgiy Sgibnev <georgiy@lab50.net>
Date:   Mon Aug 23 11:23:03 2021 +0300

    Correct decoding of signature's properties Reason & Location

 poppler/Form.cc          |  5 +++--
 poppler/SignatureInfo.cc | 21 +++++++--------------
 poppler/SignatureInfo.h  | 14 ++++++++------
 qt5/src/poppler-form.cc  |  5 +++--
 qt6/src/poppler-form.cc  |  5 +++--
 5 files changed, 24 insertions(+), 26 deletions(-)

commit 69b2bb9bb0b9ed52f25f4471ee161a4ce15deb23
Author: Even Rouault <even.rouault@spatialys.com>
Date:   Sat Aug 21 00:05:55 2021 +0200

    JBIG2Stream.cc: use gmallocn_checkoverflow() instead of gmallocn()

    This should hopefully fix the crash of
    https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=29638
    (on the GDAL project in its PDF driver), although I didn't manage to
    reproduce it with the reproducer attached to the ticket

    The mentioned stack trace was:

    ```
    0 0xf7ef2b19 in [vdso]
    1 0xf7cc1d08 in raise
    2 0xf7cc3206 in abort
    3 0xbec0a39 in gmalloc(unsigned int, bool)
    gdal/poppler/goo/gmem.h:52:5
    4 0xbef9a06 in gmallocn(int, int, bool) gdal/poppler/goo/gmem.h:119:12
    5 0xc211923 in JBIG2Stream::readSymbolDictSeg(unsigned
    int, unsigned int, unsigned int*, unsigned int)
    gdal/poppler/poppler/JBIG2Stream.cc:1650:37
    6 0xc20e607 in JBIG2Stream::readSegments()
    gdal/poppler/poppler/JBIG2Stream.cc:1331:18
    7 0xc20d72f in JBIG2Stream::reset()
    gdal/poppler/poppler/JBIG2Stream.cc:1171:5
    ```

 poppler/JBIG2Stream.cc | 26 +++++++++++++++++++++-----
 1 file changed, 21 insertions(+), 5 deletions(-)

commit a9eb92b611f97fe2eb92c4aa9a650b64d66095e0
Author: Albert Astals Cid <aacid@kde.org>
Date:   Sat Aug 21 12:11:35 2021 +0200

    splash: Make the copy() functions const

 poppler/SplashOutputDev.h    |  8 ++++----
 splash/SplashBitmap.cc       |  8 ++++----
 splash/SplashBitmap.h        | 21 ++++++++++++---------
 splash/SplashClip.cc         |  4 ++--
 splash/SplashClip.h          |  6 +++---
 splash/SplashPath.cc         |  4 ++--
 splash/SplashPath.h          |  6 +++---
 splash/SplashPattern.cc      |  4 ++--
 splash/SplashPattern.h       |  8 ++++----
 splash/SplashScreen.cc       |  4 ++--
 splash/SplashScreen.h        |  6 +++---
 splash/SplashState.cc        |  4 ++--
 splash/SplashState.h         |  6 +++---
 splash/SplashXPath.cc        |  4 ++--
 splash/SplashXPath.h         |  6 +++---
 splash/SplashXPathScanner.cc |  2 +-
 splash/SplashXPathScanner.h  |  6 +++---
 17 files changed, 55 insertions(+), 52 deletions(-)

commit aaf857abd10c961ab26c97559dffe7183b8a5a82
Author: Albert Astals Cid <aacid@kde.org>
Date:   Sat Aug 21 11:55:28 2021 +0200

    Update (C)

 splash/SplashClip.cc         | 2 +-
 splash/SplashXPathScanner.cc | 2 +-
 splash/SplashXPathScanner.h  | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

commit bfe82d7c2dba2ec3c97855232b75bde29cbdff44
Author: Thomas Freitag <thomas.freitag@alfa.de>
Date:   Fri Aug 20 15:36:49 2021 +0200

    instead of creating new scanner just copy the existing ones

 splash/SplashClip.cc         | 10 +---------
 splash/SplashXPathScanner.cc | 12 ++++++++++++
 splash/SplashXPathScanner.h  |  6 ++++++
 3 files changed, 19 insertions(+), 9 deletions(-)

commit dd507d1a460470298b749802285fce216226f417
Author: Albert Astals Cid <aacid@kde.org>
Date:   Sat Aug 21 11:38:11 2021 +0200

    Revert 73a236b23de3c0337bed0f89cb713c7831e2ad05

    It causes rendering regressions

 poppler/JBIG2Stream.cc | 26 +++++---------------------
 1 file changed, 5 insertions(+), 21 deletions(-)

commit 73a236b23de3c0337bed0f89cb713c7831e2ad05
Author: Even Rouault <even.rouault@spatialys.com>
Date:   Sat Aug 21 00:05:55 2021 +0200

    JBIG2Stream.cc: use gmallocn_checkoverflow() instead of gmallocn()

    This should hopefully fix the crash of
    https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=29638
    (on the GDAL project in its PDF driver), although I didn't manage to
    reproduce it with the reproducer attached to the ticket

    The mentioned stack trace was:

    ```
    0 0xf7ef2b19 in [vdso]
    1 0xf7cc1d08 in raise
    2 0xf7cc3206 in abort
    3 0xbec0a39 in gmalloc(unsigned int, bool)
    gdal/poppler/goo/gmem.h:52:5
    4 0xbef9a06 in gmallocn(int, int, bool) gdal/poppler/goo/gmem.h:119:12
    5 0xc211923 in JBIG2Stream::readSymbolDictSeg(unsigned
    int, unsigned int, unsigned int*, unsigned int)
    gdal/poppler/poppler/JBIG2Stream.cc:1650:37
    6 0xc20e607 in JBIG2Stream::readSegments()
    gdal/poppler/poppler/JBIG2Stream.cc:1331:18
    7 0xc20d72f in JBIG2Stream::reset()
    gdal/poppler/poppler/JBIG2Stream.cc:1171:5
    ```

 poppler/JBIG2Stream.cc | 26 +++++++++++++++++++++-----
 1 file changed, 21 insertions(+), 5 deletions(-)

commit 61b4a485429c0aac1759e1422e9b0429f3c98543
Author: Albert Astals Cid <aacid@kde.org>
Date:   Wed Aug 11 23:28:48 2021 +0200

    Update (C)

 splash/Splash.cc | 1 +
 1 file changed, 1 insertion(+)

commit 001f17def990e3ec1687fe1cc13c58b7df5b7745
Author: Even Rouault <even.rouault@spatialys.com>
Date:   Tue Aug 10 12:36:59 2021 +0200

    Splash::gouraudTriangleShadedFill(): relax assertion threshold

    On the reproducer file of
    https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=34505, the 1e-10
    threshold is hit. Relaxing it to 1e-9 avoids the assertion.

 splash/Splash.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit 56822eb116b6f8a5c6c30cffd2991956ff62e142
Author: Albert Astals Cid <aacid@kde.org>
Date:   Sat Aug 7 23:41:46 2021 +0200

    Fix the build_clang12_libcpp CI

 .gitlab-ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit 4aaabeca58ebf0d398975b5569610651e451b542
Author: Albert Astals Cid <aacid@kde.org>
Date:   Sun Aug 1 17:19:17 2021 +0200

    Poppler 21.08.0

 CMakeLists.txt         |  4 ++--
 NEWS                   | 23 +++++++++++++++++++++++
 cpp/Doxyfile           |  2 +-
 qt5/src/Doxyfile       |  2 +-
 qt6/src/CMakeLists.txt |  2 +-
 qt6/src/Doxyfile       |  2 +-
 6 files changed, 29 insertions(+), 6 deletions(-)

commit 76e31d6cefe0404f6d88f249c444ed2318958715
Author: Albert Astals Cid <aacid@kde.org>
Date:   Fri Jul 30 00:51:49 2021 +0200

    Update (C)

 poppler/DateInfo.cc         | 2 +-
 poppler/DateInfo.h          | 2 +-
 qt5/src/poppler-document.cc | 2 +-
 qt6/src/poppler-document.cc | 2 +-
 utils/pdfinfo.cc            | 2 +-
 utils/pdftohtml.cc          | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

commit 2636e51212b99359cc940b806d645a9e43c33d74
Author: Adrian Johnson <ajohnson@redneon.com>
Date:   Fri Jul 2 22:09:07 2021 +0930

    Date string may be in unicode

 glib/poppler-document.cc    |  2 +-
 poppler/DateInfo.cc         | 19 ++++++++++++----
 poppler/DateInfo.h          |  2 +-
 qt5/src/poppler-document.cc |  3 ++-
 qt6/src/poppler-document.cc |  3 ++-
 utils/pdfinfo.cc            | 55
 +++++++++++++++++++++------------------------
 utils/pdftohtml.cc          |  3 +--
 7 files changed, 47 insertions(+), 40 deletions(-)

commit fc3afe21523b3fdc3a27254a3ef8139a82d35385
Author: Oliver Sander <oliver.sander@tu-dresden.de>
Date:   Thu Jul 15 11:01:33 2021 +0200

    Use additional samples to test for constant parts of an axial gradient

    The method doAxialShFill does adaptive sampling of gradients.
    If the gradient color is found to be the same at two consecutive
    sampling locations then the gradient is concluded to be constant
    between the two locations.

    Of course, this conclusion may be wrong; one instance of this
    happening is

      https://gitlab.freedesktop.org/poppler/poppler/-/issues/938

    This patch fixes rendering of the test file in issue 938 by doing
    one more sampling when a part of the gradient is suspected to be
    constant.  Of course it is easily possible to create gradients
    also misrender with the additional sampling point.  Should such
    gradients ever appear in actual non-synthetic documents the code
    can now easily handle yet more sample points.

    Fixes: https://gitlab.freedesktop.org/poppler/poppler/-/issues/938

 poppler/Gfx.cc | 27 ++++++++++++++++++++++++++-
 1 file changed, 26 insertions(+), 1 deletion(-)

commit f35567dc6033cf8f856f5694af058fda2528cbe7
Author: Albert Astals Cid <aacid@kde.org>
Date:   Mon Jul 19 23:00:27 2021 +0200

    Fix XRef::copy when we have modified objects

 poppler/XRef.cc | 7 +++++++
 1 file changed, 7 insertions(+)

commit ef8c8ca8500ce9de91a5903b8561e3e02a81888e
Author: Albert Astals Cid <aacid@kde.org>
Date:   Thu Jul 22 17:54:47 2021 +0200

    Support reading the Version from the Catalog

    Fixes #1097

 poppler/Catalog.cc | 11 ++++++++++-
 poppler/Catalog.h  |  8 +++++++-
 poppler/PDFDoc.cc  |  8 ++++----
 poppler/PDFDoc.h   | 27 ++++++++++++++++++++-------
 4 files changed, 41 insertions(+), 13 deletions(-)

commit c61f0c0afdf2ae48db1f0b15cf1cc0023d88c203
Author: Albert Astals Cid <aacid@kde.org>
Date:   Wed Jul 21 21:44:54 2021 +0200

    GfxCIDFont::getNextChar: Also set ox and oy to 0 on the non cmap case

    Otherwise we may end up using uninitized values

    oss-fuzz/36396

 poppler/GfxFont.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

commit c85a85423e3fe0c914d0a5b3f3e9e3ba3205fb79
Author: Hib Eris <hib@hiberis.nl>
Date:   Fri Jul 16 15:25:52 2021 +0200

    Validate input from page offset hints table

    Fixes: https://gitlab.freedesktop.org/poppler/poppler/-/issues/343

 poppler/Hints.cc | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

commit 87422fcfc35959235aea74e78bc58a1b1a5c116f
Author: Albert Astals Cid <aacid@kde.org>
Date:   Sun Jul 18 00:43:22 2021 +0200

    Update (C)

 poppler/Gfx.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit 9998ae596bd26cc7b61f176dda0fcee6e1dd346b
Author: Oliver Sander <oliver.sander@tu-dresden.de>
Date:   Thu Jul 15 15:46:43 2021 +0200

    Replace a local bubble sort implementation by std::sort

    This makes the code a bit shorter.

 poppler/Gfx.cc | 21 +++------------------
 1 file changed, 3 insertions(+), 18 deletions(-)

commit 3d49757055dbcd2876c0b26ee00a7bd780541938
Author: Albert Astals Cid <aacid@kde.org>
Date:   Thu Jul 15 22:19:30 2021 +0200

    Update (C)

 qt5/src/poppler-document.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit 13c95f251bf47068a3c083bf038cab86fea7f570
Author: Oliver Sander <oliver.sander@tu-dresden.de>
Date:   Fri Jul 9 11:55:24 2021 +0200

    Make getPdfVersion return a dedicated version object

    That's a bit more modern than the old way where pointers to two
    integers had to be passed to the method.

    With the new method you can write

      auto pdfVersion = doc->getPdfVersion();
      // access numbers as pdfVersion.major and pdfVersion.minor

    instead of

      int major, minor;
      doc->getPdfVersion(&major, &minor);

    With C++17 you can even write

      auto [major, minor] = doc->getPdfVersion();

    The new method is put alongside the old one in the Qt5 interface.
    It replaces the old one in the Qt6 interface.

 qt5/src/poppler-document.cc      |  5 +++++
 qt5/src/poppler-qt5.h            | 20 +++++++++++++++++++-
 qt5/tests/check_metadata.cpp     |  7 +++----
 qt5/tests/stress-poppler-dir.cpp |  7 +++++--
 qt5/tests/stress-poppler-qt5.cpp |  4 ++--
 qt5/tests/test-password-qt5.cpp  |  5 ++---
 qt5/tests/test-poppler-qt5.cpp   |  5 ++---
 qt6/src/poppler-document.cc      |  7 ++-----
 qt6/src/poppler-qt6.h            | 14 +++++++++-----
 qt6/tests/check_metadata.cpp     |  7 +++----
 qt6/tests/stress-poppler-dir.cpp |  4 ++--
 qt6/tests/stress-poppler-qt6.cpp |  4 ++--
 qt6/tests/test-password-qt6.cpp  |  5 ++---
 qt6/tests/test-poppler-qt6.cpp   |  5 ++---
 14 files changed, 60 insertions(+), 39 deletions(-)

commit fdb83a88ce196413a874c3e0fb6fbd200b56393c
Author: Nelson Benítez León <nbenitezl@gmail.com>
Date:   Mon Jul 5 15:42:44 2021 -0400

    glib: mimick TextSelectionDumper logic change for spaceAfter

    Commit d6cccfb8d814d89c51c9e65563be2e475f46212b caused
    issue #1100 because that change in the TextSelectionDumper
    logic *must be mimicked* in poppler_page_get_text_layout_for_area()
    and in poppler_page_get_text_attributes_for_area() because
    all those functions must be consistent with each other in
    the way they traverse and extract the text from the PDF.

    Otherwise, wrong results may happen when using them
    to map between graphical coordinates of text glyphs and
    their corresponding positions in the text obtained from
    poppler_page_get_text() (which uses TextSelectionDumper
    to extract the text).

    Fixes issue #1100

 glib/poppler-page.cc | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

commit e2f7f5e8eae0cb13d88af4400d68697c6e6bf5ed
Author: Nelson Benítez León <nbenitezl@gmail.com>
Date:   Sat Jul 10 00:13:46 2021 -0400

    Add glib test for issue #1100

 glib/tests/check_text.c | 43 ++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 42 insertions(+), 1 deletion(-)

commit eea6b4f9caa7555009d959de51acb81037b2a465
Author: Albert Astals Cid <aacid@kde.org>
Date:   Sat Jul 10 23:59:35 2021 +0200

    AnnotAppearanceBuilder::drawListBox: Fix memory leak on error
    condition

    oss-fuzz/35996

 poppler/Annot.cc | 3 +++
 1 file changed, 3 insertions(+)

commit 5977890bb79798ec3ad48b9806d760a1d2746990
Author: Albert Astals Cid <aacid@kde.org>
Date:   Thu Jul 8 23:07:07 2021 +0200

    Update (C)

 qt5/src/poppler-qt5.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit ab409a6ec85dc7511dbe8ea6b2e4d7897f36670b
Author: Oliver Sander <oliver.sander@tu-dresden.de>
Date:   Thu Jul 8 20:56:49 2021 +0200

    Document that a document has to outlive its pages

    Because the Page objects handed out by Document objects store a
    pointer to the document.  If the Document object is deleted
    before a Page object it handed out, that Page object will have
    a stale pointer.

 qt5/src/poppler-qt5.h | 5 +++++
 qt6/src/poppler-qt6.h | 5 +++++
 2 files changed, 10 insertions(+)

commit 1d23101ccebe14261c6afc024ea14f29d209e760
Author: Albert Astals Cid <aacid@kde.org>
Date:   Wed Jul 7 01:05:57 2021 +0200

    Update (C)

 poppler/Annot.cc                 | 1 +
 poppler/Annot.h                  | 1 +
 poppler/Catalog.cc               | 1 +
 poppler/Catalog.h                | 1 +
 poppler/Outline.cc               | 1 +
 poppler/Outline.h                | 1 +
 poppler/PDFDoc.cc                | 1 +
 qt5/src/poppler-pdf-converter.cc | 1 +
 qt6/src/poppler-pdf-converter.cc | 1 +
 9 files changed, 9 insertions(+)

commit fa494b780ab69ef04ba7447ab6d8fc3b46373e59
Author: RM <rm+git@arcsin.org>
Date:   Mon May 3 12:22:16 2021 -0400

    Modify internal API to allow addition and modification of outlines
    into a PDF. Tests in the qt5/qt6 directories.

    duplicate qt5 outline test in qt6 directory

 poppler/Catalog.cc                   |  37 +++
 poppler/Catalog.h                    |   2 +
 poppler/Outline.cc                   | 469
 +++++++++++++++++++++++++++++++++--
 poppler/Outline.h                    |  62 +++--
 poppler/PDFDoc.cc                    |   2 +-
 qt5/tests/CMakeLists.txt             |   1 +
 qt5/tests/check_internal_outline.cpp | 436
 ++++++++++++++++++++++++++++++++
 qt6/tests/CMakeLists.txt             |   1 +
 qt6/tests/check_internal_outline.cpp | 436
 ++++++++++++++++++++++++++++++++
 9 files changed, 1402 insertions(+), 44 deletions(-)

commit e674ca6453f3f20c4bf0cb463222a97c99221dd6
Author: Zachary Travis <ztravis@everlaw.com>
Date:   Tue Jul 6 22:53:22 2021 +0000

    Create fallback fonts as needed.

    If a PDF form field value uses a font that is not in the resources
    dictionary, a warning is logged and the field value is ignored/not
    displayed. It's unclear whether this behavior is strictly valid based
    on the PDF spec (since typically font references, even to base fonts,
    require a corresponding font dictionary) but Acrobat seems to display
    the content anyway.

 poppler/Annot.cc                 | 126
 +++++++++++++++++++--------------------
 poppler/Annot.h                  |  17 +++---
 qt5/src/poppler-pdf-converter.cc |   4 +-
 qt6/src/poppler-pdf-converter.cc |   4 +-
 4 files changed, 71 insertions(+), 80 deletions(-)

commit f2a6c6fe06ba2279f8509c56a11d649f02d1500c
Author: Albert Astals Cid <aacid@kde.org>
Date:   Sun Jul 4 22:02:08 2021 +0200

    JBIG2Stream: Fix regression caused by
    2b2808719d2c91283ae358381391bb0b37d9061d

 poppler/JBIG2Stream.cc | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

commit fcdff7bb19e2ac0fab6505f17e0c18c8faa86323
Author: Uli Schlachter <psychon@znc.in>
Date:   Thu Jul 1 16:20:39 2021 +0200

    Better error messages when libopenjpeg2 is not found

    When I run "cmake -DENABLE_DCTDECODER=none -DENABLE_BOOST=OFF" on my
    system, I get the following output:

        -- Found Iconv: /usr/lib/x86_64-linux-gnu/libc.so
        CMake Warning at CMakeLists.txt:252 (find_package):
          By not providing "FindOpenJPEG.cmake" in CMAKE_MODULE_PATH
          this project has
          asked CMake to find a package configuration file provided by
          "OpenJPEG",
          but CMake did not find one.

          Could not find a package configuration file provided by
