From 707cbab98ad37555fb0776fae291e7f25dd20db9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89rico=20Nogueira?= Date: Sun, 29 Aug 2021 01:24:47 -0300 Subject: [PATCH] doxygen: update to 1.9.2. --- ...-Fix-memory-corruption-in-TextStream.patch | 40 +++++++++++++++++++ srcpkgs/doxygen/patches/fix-time64.patch | 19 --------- srcpkgs/doxygen/template | 5 ++- 3 files changed, 43 insertions(+), 21 deletions(-) create mode 100644 srcpkgs/doxygen/patches/0001-Fix-memory-corruption-in-TextStream.patch delete mode 100644 srcpkgs/doxygen/patches/fix-time64.patch diff --git a/srcpkgs/doxygen/patches/0001-Fix-memory-corruption-in-TextStream.patch b/srcpkgs/doxygen/patches/0001-Fix-memory-corruption-in-TextStream.patch new file mode 100644 index 0000000000..80c7ff16d1 --- /dev/null +++ b/srcpkgs/doxygen/patches/0001-Fix-memory-corruption-in-TextStream.patch @@ -0,0 +1,40 @@ +upstream PR: https://github.com/doxygen/doxygen/pull/8739 + +What was happening is that the TextStream object is reused for multiple +different files. Therefore, when one calls setStream(nullptr) or +setFile(nullptr), m_f or m_s will, respectively, still contain a pointer +to the previous member, which is used when one calls setFile() or +setStream() again, since these methods will call flush(). + +For example, a program doing + + s.setFile(f1); + s.setStream(nullptr); + fclose(f1); + s.setFile(f2); + +will call fwrite(f1, ...). This pattern can be observed in many parts of +Doxygen, so fixing it in TextStream itself by always zeroing the other +pointer is the simplest fix. + +diff --git a/src/textstream.h b/src/textstream.h +index 161ce7fe..38027ec0 100644 +--- a/src/textstream.h ++++ b/src/textstream.h +@@ -67,11 +67,13 @@ class TextStream final + { + flush(); + m_s = s; ++ m_f = nullptr; + } + + void setFile(FILE *f) + { + flush(); ++ m_s = nullptr; + m_f = f; + } + +-- +2.33.0 + diff --git a/srcpkgs/doxygen/patches/fix-time64.patch b/srcpkgs/doxygen/patches/fix-time64.patch deleted file mode 100644 index 4f9616b31a..0000000000 --- a/srcpkgs/doxygen/patches/fix-time64.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- a/qtools/qdatetime.cpp 2020-01-03 23:51:18.000000000 +0100 -+++ b/qtools/qdatetime.cpp 2020-12-02 10:48:03.245635836 +0100 -@@ -35,7 +35,6 @@ - ** - **********************************************************************/ - --#define gettimeofday __hide_gettimeofday - #include "qdatetime.h" - #include "qdatastream.h" - #include -@@ -55,8 +54,6 @@ - #elif defined(_OS_UNIX_) || defined(_OS_MAC_) - #include - #include --#undef gettimeofday --extern "C" int gettimeofday( struct timeval *, struct timezone * ); - #endif - - static const uint FIRST_DAY = 2361222; // Julian day for 1752/09/14 diff --git a/srcpkgs/doxygen/template b/srcpkgs/doxygen/template index 051c1568bb..8f5b986cea 100644 --- a/srcpkgs/doxygen/template +++ b/srcpkgs/doxygen/template @@ -1,6 +1,6 @@ # Template file for 'doxygen' pkgname=doxygen -version=1.9.1 +version=1.9.2 revision=1 build_style=cmake configure_args="-DCMAKE_BUILD_TYPE=None" @@ -10,8 +10,9 @@ short_desc="Source code documentation generator tool" maintainer="Érico Nogueira " license="GPL-2.0-only" homepage="http://www.doxygen.org/" +changelog="https://www.doxygen.nl/manual/changelog.html" distfiles="http://doxygen.nl/files/doxygen-${version}.src.tar.gz" -checksum=67aeae1be4e1565519898f46f1f7092f1973cce8a767e93101ee0111717091d1 +checksum=060f254bcef48673cc7ccf542736b7455b67c110b30fdaa33512a5b09bbecee5 build_options="wizard" desc_option_wizard="build Qt5 GUI configuration tool, doxywizard"