From 39bce8852991276387e18b85dfde79df2f9a0033 Mon Sep 17 00:00:00 2001 From: Than Ngo Date: Mon, 25 May 2020 16:41:13 +0200 Subject: [PATCH] update to 1.8.18 backport fixes: buffer-overflow, memory leeks and md5 hash does not match for2 diffferent runs --- .gitignore | 1 + ...1.8.17-broken-urls-in-the-xml-output.patch | 102 ---- doxygen-1.8.17-buffer-overflow.patch | 53 +++ doxygen-1.8.17-test-suite-is-failing.patch | 78 ---- ...oes-not-match-for-two-different-runs.patch | 441 ++++++++++++++++++ doxygen-1.8.18-memory-leaks.patch | 66 +++ doxygen.spec | 14 +- sources | 2 +- 8 files changed, 572 insertions(+), 185 deletions(-) delete mode 100644 doxgen-1.8.17-broken-urls-in-the-xml-output.patch create mode 100644 doxygen-1.8.17-buffer-overflow.patch delete mode 100644 doxygen-1.8.17-test-suite-is-failing.patch create mode 100644 doxygen-1.8.18-md5-hash-does-not-match-for-two-different-runs.patch create mode 100644 doxygen-1.8.18-memory-leaks.patch diff --git a/.gitignore b/.gitignore index abde3a8..c209cab 100644 --- a/.gitignore +++ b/.gitignore @@ -50,3 +50,4 @@ doxygen-1.7.1.src.tar.gz /doxygen-1.8.15.src.tar.gz /doxygen-1.8.16.src.tar.gz /doxygen-1.8.17.src.tar.gz +/doxygen-1.8.18.src.tar.gz diff --git a/doxgen-1.8.17-broken-urls-in-the-xml-output.patch b/doxgen-1.8.17-broken-urls-in-the-xml-output.patch deleted file mode 100644 index 6376a8e..0000000 --- a/doxgen-1.8.17-broken-urls-in-the-xml-output.patch +++ /dev/null @@ -1,102 +0,0 @@ -commit 2f79c6938c6d969f3d4ebc9ed0f2648668434502 -Author: albert-github -Date: Sat Jan 4 13:24:16 2020 +0100 - - issue #7477 Broken urls in the xml output - - Made code analogous to HTML code. - Also the doxygen internal tests suffered from this problem. - -diff --git a/src/xmldocvisitor.cpp b/src/xmldocvisitor.cpp -index 409c2fe6..1e6becbe 100644 ---- a/src/xmldocvisitor.cpp -+++ b/src/xmldocvisitor.cpp -@@ -824,18 +824,22 @@ void XmlDocVisitor::visitPre(DocImage *img) - { - if (m_hide) return; - -- QCString baseName=img->name(); -- int i; -- if ((i=baseName.findRev('/'))!=-1 || (i=baseName.findRev('\\'))!=-1) -+ QCString url = img->url(); -+ QCString baseName; -+ if (url.isEmpty()) - { -- baseName=baseName.right(baseName.length()-i-1); -+ baseName = img->relPath()+img->name(); -+ } -+ else -+ { -+ baseName = correctURL(url,img->relPath()); - } - visitPreStart(m_t, "image", FALSE, this, img->children(), baseName, TRUE, img->type(), img->width(), img->height(), img ->isInlineImage()); - - // copy the image to the output dir - FileDef *fd; - bool ambig; -- if ((fd=findFileDef(Doxygen::imageNameDict,img->name(),ambig))) -+ if (url.isEmpty() && (fd=findFileDef(Doxygen::imageNameDict,img->name(),ambig))) - { - QFile inImage(fd->absFilePath()); - QFile outImage(Config_getString(XML_OUTPUT)+"/"+baseName.data()); -diff --git a/testing/031/indexpage.xml b/testing/031/indexpage.xml -index 2d74510a..eaf374b6 100644 ---- a/testing/031/indexpage.xml -+++ b/testing/031/indexpage.xml -@@ -11,42 +11,42 @@ - - More text. - SVG image with caption: --A caption -+A caption - - PNG image with caption: --A caption -+A caption - - SVG image without caption: -- -+ - - PNG image without caption: -- -+ - - Inline SVG image with caption: --This image is inline MIT license -+This image is inline MIT license - within the text. - Inline PNG image with caption: --This image is inline MIT license -+This image is inline MIT license - within the text. - Markdown style linked SVG image: -- -+ - Markdown style linked PNG image: -- -+ - HTML style linked SVG image: -- -+ - HTML style linked PNG image: -- -+ - HTML style unlinked SVG image: -- -+ - - HTML style unlinked PNG image: -- -+ - - Some markdown image tests -- -+ - Some normal link - -- -+ - Some normal link - - diff --git a/doxygen-1.8.17-buffer-overflow.patch b/doxygen-1.8.17-buffer-overflow.patch new file mode 100644 index 0000000..abcad1b --- /dev/null +++ b/doxygen-1.8.17-buffer-overflow.patch @@ -0,0 +1,53 @@ +commit 81cda478974e4198b10054a5ef49bc250c1a3cf7 +Author: albert-github +Date: Sat May 2 20:24:38 2020 +0200 + + Input buffer overflow in php input code (#7745) + + When having a very long initialization line in php code we get the message: + ``` + input buffer overflow, can't enlarge buffer because scanner uses REJECT + ``` + + In this case the, easy, solution is to split, in the lexer, the input based on the commas. + +diff --git a/src/scanner.l b/src/scanner.l +index 8ceb4adb..e9cad5f8 100644 +--- a/src/scanner.l ++++ b/src/scanner.l +@@ -2898,7 +2898,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) + *yyextra->pCopyRoundString+=yytext; + } + } +-[^"'()\n]+ { ++[^"'()\n,]+ { + *yyextra->pCopyRoundString+=yytext; + } + . { +@@ -2948,7 +2948,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) + *yyextra->pCopyRoundGString+=yytext; + } + } +-[^"'()\n/]+ { ++[^"'()\n\/,]+ { + *yyextra->pCopyRoundGString+=yytext; + } + . { +@@ -2998,7 +2998,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) + *yyextra->pCopySquareGString+=yytext; + } + } +-[^"\[\]\n/]+ { ++[^"\[\]\n\/,]+ { + *yyextra->pCopySquareGString+=yytext; + } + . { +@@ -3039,7 +3039,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) + *yyextra->pCopyCurlyString+=yytext; + } + } +-[^"'{}\/\n]+ { ++[^"'{}\/\n,]+ { + *yyextra->pCopyCurlyString+=yytext; + } + "/" { *yyextra->pCopyCurlyString+=yytext; } diff --git a/doxygen-1.8.17-test-suite-is-failing.patch b/doxygen-1.8.17-test-suite-is-failing.patch deleted file mode 100644 index b41002e..0000000 --- a/doxygen-1.8.17-test-suite-is-failing.patch +++ /dev/null @@ -1,78 +0,0 @@ -commit cd9dee013dc749a10bbe019c350e0e62b6635795 -Author: albert-github -Date: Wed Jan 1 17:51:53 2020 +0100 - - issue #7464 1.8.17: test suite is failing - - On Windows the syntax with the command and arguments in one string worked but on *nix (and Cygwin) it didn't. - - changed calls to Popen to split command (see also: https://docs.python.org/3/library/subprocess.html). - - explicitly specify files to check for xhtml - - changed call to xmllint for xhtml and docbook (due to stdout overflow in some cases, we are not really interested in the, formatted, output of xmllint). - - in the update part a `read` was left, should have been removed. - -diff --git a/testing/runtests.py b/testing/runtests.py -index a4118b86..10fe5021 100755 ---- a/testing/runtests.py -+++ b/testing/runtests.py -@@ -3,6 +3,7 @@ - from __future__ import print_function - import argparse, glob, itertools, re, shutil, os, sys - import subprocess -+import shlex - - config_reg = re.compile('.*\/\/\s*(?P\S+):\s*(?P.*)$') - -@@ -28,10 +29,10 @@ def xpopen(cmd, cmd1="",encoding='utf-8-sig', getStderr=False): - return os.popen(cmd).read() # Python 2 without encoding - else: - if (getStderr): -- proc = subprocess.run(cmd1,encoding=encoding,capture_output=True) # Python 3 with encoding -- return proc.stderr -+ proc = subprocess.Popen(shlex.split(cmd1),stdout=subprocess.PIPE,stderr=subprocess.PIPE,encoding=encoding) # Python 3 with encoding -+ return proc.stderr.read() - else: -- proc = subprocess.Popen(cmd,stdout=subprocess.PIPE,stderr=subprocess.PIPE,encoding=encoding) # Python 3 with encoding -+ proc = subprocess.Popen(shlex.split(cmd),stdout=subprocess.PIPE,stderr=subprocess.PIPE,encoding=encoding) # Python 3 with encoding - return proc.stdout.read() - - class Tester: -@@ -137,7 +138,7 @@ class Tester: - print('GENERATE_DOCBOOK=NO', file=f) - if (self.args.xhtml): - print('GENERATE_HTML=YES', file=f) -- # HTML_OUTPUT can also be set locally -+ # HTML_OUTPUT can also have been set locally - print('HTML_OUTPUT=%s/html' % self.test_out, file=f) - print('HTML_FILE_EXTENSION=.xhtml', file=f) - if (self.args.pdf): -@@ -184,7 +185,7 @@ class Tester: - print('Non-existing file %s after \'check:\' statement' % check_file) - return - # convert output to canonical form -- data = xpopen('%s --format --noblanks --nowarning %s' % (self.args.xmllint,check_file)).read() -+ data = xpopen('%s --format --noblanks --nowarning %s' % (self.args.xmllint,check_file)) - if data: - # strip version - data = re.sub(r'xsd" version="[0-9.-]+"','xsd" version=""',data).rstrip('\n') -@@ -326,7 +327,7 @@ class Tester: - tests.append(glob.glob('%s/*.xml' % (docbook_output))) - tests.append(glob.glob('%s/*/*/*.xml' % (docbook_output))) - tests = ' '.join(list(itertools.chain.from_iterable(tests))).replace(self.args.outputdir +'/','').replace('\\','/') -- exe_string = '%s --nonet --postvalid %s' % (self.args.xmllint,tests) -+ exe_string = '%s --noout --nonet --postvalid %s' % (self.args.xmllint,tests) - exe_string1 = exe_string - exe_string += ' %s' % (redirx) - exe_string += ' %s more "%s/temp"' % (separ,docbook_output) -@@ -346,7 +347,11 @@ class Tester: - redirx=' 2> %s/temp >nul:'%html_output - else: - redirx='2>%s/temp >/dev/null'%html_output -- exe_string = '%s --path dtd --nonet --postvalid %s/*xhtml' % (self.args.xmllint,html_output) -+ check_file = [] -+ check_file.append(glob.glob('%s/*.xhtml' % (html_output))) -+ check_file.append(glob.glob('%s/*/*/*.xhtml' % (html_output))) -+ check_file = ' '.join(list(itertools.chain.from_iterable(check_file))).replace(self.args.outputdir +'/','').replace('\\','/') -+ exe_string = '%s --noout --path dtd --nonet --postvalid %s' % (self.args.xmllint,check_file) - exe_string1 = exe_string - exe_string += ' %s' % (redirx) - exe_string += ' %s more "%s/temp"' % (separ,html_output) diff --git a/doxygen-1.8.18-md5-hash-does-not-match-for-two-different-runs.patch b/doxygen-1.8.18-md5-hash-does-not-match-for-two-different-runs.patch new file mode 100644 index 0000000..d5ac6b5 --- /dev/null +++ b/doxygen-1.8.18-md5-hash-does-not-match-for-two-different-runs.patch @@ -0,0 +1,441 @@ +commit f3ebc866c88b31ab393637e30189d41ddb7f84f0 +Author: Dimitri van Heesch +Date: Fri Apr 17 21:39:13 2020 +0200 + + issue #7706: Md5 hash does not match for two different runs + +diff --git a/src/memberlist.cpp b/src/memberlist.cpp +index 8a76a1d7..b5377a49 100644 +--- a/src/memberlist.cpp ++++ b/src/memberlist.cpp +@@ -1,12 +1,12 @@ + /****************************************************************************** + * +- * ++ * + * + * Copyright (C) 1997-2015 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its +- * documentation under the terms of the GNU General Public License is hereby +- * granted. No representations are made about the suitability of this software ++ * documentation under the terms of the GNU General Public License is hereby ++ * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * +@@ -63,10 +63,11 @@ MemberList::~MemberList() + delete memberGroupList; + } + +-int MemberList::compareValues(const MemberDef *c1, const MemberDef *c2) const ++static int genericCompareMembers(const MemberDef *c1,const MemberDef *c2) + { +- static bool sortConstructorsFirst = Config_getBool(SORT_MEMBERS_CTORS_1ST); +- if (sortConstructorsFirst) { ++ bool sortConstructorsFirst = Config_getBool(SORT_MEMBERS_CTORS_1ST); ++ if (sortConstructorsFirst) ++ { + int ord1 = c1->isConstructor() ? 2 : (c1->isDestructor() ? 1 : 0); + int ord2 = c2->isConstructor() ? 2 : (c2->isDestructor() ? 1 : 0); + if (ord1 > ord2) +@@ -74,11 +75,19 @@ int MemberList::compareValues(const MemberDef *c1, const MemberDef *c2) const + else if (ord2 > ord1) + return 1; + } ++ // sort on name + int cmp = qstricmp(c1->name(),c2->name()); ++ // then on argument list + if (cmp==0 && c1->argsString() && c2->argsString()) + { + cmp = qstricmp(c1->argsString(),c2->argsString()); + } ++ // then on file in which the item is defined ++ if (cmp==0) ++ { ++ cmp = qstricmp(c1->getDefFileName(),c2->getDefFileName()); ++ } ++ // then on line number at which the member is defined + if (cmp==0) + { + cmp = c1->getDefLine()-c2->getDefLine(); +@@ -86,6 +95,11 @@ int MemberList::compareValues(const MemberDef *c1, const MemberDef *c2) const + return cmp; + } + ++int MemberList::compareValues(const MemberDef *c1, const MemberDef *c2) const ++{ ++ return genericCompareMembers(c1,c2); ++} ++ + int MemberList::countInheritableMembers(const ClassDef *inheritedFrom) const + { + int count=0; +@@ -295,7 +309,7 @@ MemberDef *MemberList::take(uint index) + } + + MemberListIterator::MemberListIterator(const MemberList &l) : +- QListIterator(l) ++ QListIterator(l) + { + } + +@@ -385,9 +399,9 @@ bool MemberList::declVisible() const + case MemberType_Service: // fall through + case MemberType_Sequence: // fall through + case MemberType_Dictionary: // fall through +- case MemberType_Event: ++ case MemberType_Event: + return TRUE; +- case MemberType_Enumeration: ++ case MemberType_Enumeration: + { + // if this is an anonymous enum and there are variables of this + // enum type (i.e. enumVars>0), then we do not show the enum here. +@@ -399,7 +413,7 @@ bool MemberList::declVisible() const + break; + case MemberType_Friend: + return TRUE; +- case MemberType_EnumValue: ++ case MemberType_EnumValue: + { + if (m_inGroup) + { +@@ -431,7 +445,7 @@ void MemberList::writePlainDeclarations(OutputList &ol, + } + //printf(" --> writePlainDeclaration() numDecMembers()=%d\n", + // numDecMembers()); +- ++ + ol.pushGeneratorState(); + + bool first=TRUE; +@@ -460,13 +474,13 @@ void MemberList::writePlainDeclarations(OutputList &ol, + case MemberType_Service: // fall through + case MemberType_Sequence: // fall through + case MemberType_Dictionary: // fall through +- case MemberType_Event: ++ case MemberType_Event: + { + if (first) ol.startMemberList(),first=FALSE; + md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup,inheritedFrom,inheritId); + break; + } +- case MemberType_Enumeration: ++ case MemberType_Enumeration: + { + // if this is an anonymous enum and there are variables of this + // enum type (i.e. enumVars>0), then we do not show the enum here. +@@ -531,7 +545,7 @@ void MemberList::writePlainDeclarations(OutputList &ol, + case MemberType_Friend: + if (inheritedFrom==0) + { +- if (first) ++ if (first) + { + ol.startMemberList(); + first=FALSE; +@@ -539,7 +553,7 @@ void MemberList::writePlainDeclarations(OutputList &ol, + md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup,inheritedFrom,inheritId); + break; + } +- case MemberType_EnumValue: ++ case MemberType_EnumValue: + { + if (m_inGroup) + { +@@ -565,7 +579,7 @@ void MemberList::writePlainDeclarations(OutputList &ol, + //printf("anonymous compound members\n"); + if (md->isBriefSectionVisible()) + { +- if (first) ++ if (first) + { + ol.startMemberList(); + first=FALSE; +@@ -576,10 +590,10 @@ void MemberList::writePlainDeclarations(OutputList &ol, + } + } + } +- +- if (!first) ++ ++ if (!first) + { +- ol.endMemberList(); ++ ol.endMemberList(); + } + + ol.popGeneratorState(); +@@ -635,7 +649,7 @@ void MemberList::writeDeclarations(OutputList &ol, + if (title) + { + ol.writeInheritedSectionTitle(inheritId,cd->getReference(), +- cd->getOutputFileBase(), ++ cd->getOutputFileBase(), + cd->anchor(),title,cd->displayName()); + } + ol.popGeneratorState(); +@@ -643,7 +657,7 @@ void MemberList::writeDeclarations(OutputList &ol, + } + else if (num>numEnumValues) + { +- if (title) ++ if (title) + { + if (showInline) + { +@@ -663,7 +677,7 @@ void MemberList::writeDeclarations(OutputList &ol, + ol.endMemberHeader(); + } + } +- if (subtitle) ++ if (subtitle) + { + QCString st=subtitle; + st = st.stripWhiteSpace(); +@@ -728,7 +742,7 @@ void MemberList::writeDeclarations(OutputList &ol, + } + } + } +- if (inheritedFrom && cd) ++ if (inheritedFrom && cd) + { + // also add members that of this list type, that are grouped together + // in a separate list in class 'inheritedFrom' +@@ -772,7 +786,7 @@ void MemberList::writeDocumentation(OutputList &ol, + overloadCountDict.setAutoDelete(TRUE); + for (mli.toFirst() ; (md=mli.current()) ; ++mli) + { +- if (md->isDetailedSectionVisible(m_inGroup,container->definitionType()==Definition::TypeFile) && ++ if (md->isDetailedSectionVisible(m_inGroup,container->definitionType()==Definition::TypeFile) && + !(md->isEnumValue() && !showInline)) + { + uint *pCount = overloadTotalDict.find(md->name()); +@@ -790,7 +804,7 @@ void MemberList::writeDocumentation(OutputList &ol, + + for (mli.toFirst() ; (md=mli.current()) ; ++mli) + { +- if (md->isDetailedSectionVisible(m_inGroup,container->definitionType()==Definition::TypeFile) && ++ if (md->isDetailedSectionVisible(m_inGroup,container->definitionType()==Definition::TypeFile) && + !(md->isEnumValue() && !showInline)) + { + uint overloadCount = *overloadTotalDict.find(md->name()); +@@ -949,7 +963,7 @@ void MemberList::addListReferences(Definition *def) + MemberDef *vmd; + for ( ; (vmd=vmli.current()) ; ++vmli) + { +- //printf(" adding %s\n",vmd->name().data()); ++ //printf(" adding %s\n",vmd->name().data()); + vmd->addListReference(def); + } + } +@@ -990,7 +1004,7 @@ void MemberList::setNeedsSorting(bool b) + m_needsSorting = b; + } + +-QCString MemberList::listTypeAsString(MemberListType type) ++QCString MemberList::listTypeAsString(MemberListType type) + { + switch(type) + { +@@ -1087,16 +1101,7 @@ void MemberList::writeTagFile(FTextStream &tagFile) + + int MemberSDict::compareValues(const MemberDef *c1, const MemberDef *c2) const + { +- //printf("MemberSDict::compareValues(%s,%s)\n",c1->name().data(),c2->name().data()); +- int cmp = qstricmp(c1->name(),c2->name()); +- if (cmp) +- { +- return cmp; +- } +- else +- { +- return c1->getDefLine()-c2->getDefLine(); +- } ++ return genericCompareMembers(c1,c2); + } + + +commit cd581388f3d013c501e3cefbaf3e81cf93d46fcb +Author: Dimitri van Heesch +Date: Sun Apr 19 14:21:18 2020 +0200 + + issue #7706: Md5 hash does not match for two different runs (part 2) + +diff --git a/src/dotfilepatcher.cpp b/src/dotfilepatcher.cpp +index e386af98..20ce4c1b 100644 +--- a/src/dotfilepatcher.cpp ++++ b/src/dotfilepatcher.cpp +@@ -132,7 +132,7 @@ static QCString replaceRef(const QCString &buf,const QCString relPath, + //bool isXLink=FALSE; + int len = 6; + int indexS = buf.find("href=\""), indexE; +- bool setTarget = FALSE; ++ bool targetAlreadySet = buf.find("target=")!=-1; + if (indexS>5 && buf.find("xlink:href=\"")!=-1) // XLink href (for SVG) + { + indexS-=6; +@@ -152,9 +152,9 @@ static QCString replaceRef(const QCString &buf,const QCString relPath, + // fake ref node to resolve the url + DocRef *df = new DocRef( (DocNode*) 0, link.mid(5), context ); + result+=externalRef(relPath,df->ref(),TRUE); +- if (!df->file().isEmpty()) ++ if (!df->file().isEmpty()) + result += df->file().data() + Doxygen::htmlFileExtension; +- if (!df->anchor().isEmpty()) ++ if (!df->anchor().isEmpty()) + result += "#" + df->anchor(); + delete df; + result += "\""; +@@ -174,7 +174,6 @@ static QCString replaceRef(const QCString &buf,const QCString relPath, + if (!ref.isEmpty()) + { + result = externalLinkTarget(true); +- if (result != "") setTarget = TRUE; + } + result+= href+"=\""; + result+=externalRef(relPath,ref,TRUE); +@@ -185,12 +184,14 @@ static QCString replaceRef(const QCString &buf,const QCString relPath, + result = href+"=\"" + link + "\""; + } + } +- if (!target.isEmpty() && !setTarget) ++ if (!target.isEmpty() && !targetAlreadySet) + { + result+=" target=\""+target+"\""; + } + QCString leftPart = buf.left(indexS); + QCString rightPart = buf.mid(indexE+1); ++ //printf("replaceRef(\n'%s'\n)->\n'%s+%s+%s'\n", ++ // buf.data(),leftPart.data(),result.data(),rightPart.data()); + return leftPart + result + rightPart; + } + else +@@ -215,7 +216,7 @@ bool DotFilePatcher::convertMapFile(FTextStream &t,const char *mapName, + const QCString &context) + { + QFile f(mapName); +- if (!f.open(IO_ReadOnly)) ++ if (!f.open(IO_ReadOnly)) + { + err("problems opening map file %s for inclusion in the docs!\n" + "If you installed Graphviz/dot after a previous failing run, \n" +@@ -250,7 +251,7 @@ bool DotFilePatcher::convertMapFile(FTextStream &t,const char *mapName, + return TRUE; + } + +-DotFilePatcher::DotFilePatcher(const char *patchFile) ++DotFilePatcher::DotFilePatcher(const char *patchFile) + : m_patchFile(patchFile) + { + m_maps.setAutoDelete(TRUE); +@@ -346,7 +347,7 @@ bool DotFilePatcher::run() const + } + QFile fi(tmpName); + QFile fo(patchFile); +- if (!fi.open(IO_ReadOnly)) ++ if (!fi.open(IO_ReadOnly)) + { + err("problem opening file %s for patching!\n",tmpName.data()); + QDir::current().rename(tmpName,patchFile); +@@ -380,7 +381,7 @@ bool DotFilePatcher::run() const + ASSERT(numBytes600) height=600; // clip to maximum height of 600 pixels + out << "
"; +- //out << ""; + } + else + { +- //out << ""; + } + writeSVGNotSupported(out); +@@ -650,7 +651,7 @@ bool DotFilePatcher::writeVecGfxFigure(FTextStream &out,const QCString &baseName + } + //printf("Got PDF/EPS size %d,%d\n",width,height); + int maxWidth = 350; /* approx. page width in points, excl. margins */ +- int maxHeight = 550; /* approx. page height in points, excl. margins */ ++ int maxHeight = 550; /* approx. page height in points, excl. margins */ + out << "\\nopagebreak\n" + "\\begin{figure}[H]\n" + "\\begin{center}\n" +diff --git a/src/dotgraph.cpp b/src/dotgraph.cpp +index e622dd4f..c0cc4fdf 100644 +--- a/src/dotgraph.cpp ++++ b/src/dotgraph.cpp +@@ -74,15 +74,6 @@ static bool checkDeliverables(const QCString &file1, + return file1Ok && file2Ok; + } + +-static void removeDotGraph(const QCString &dotName) +-{ +- if (Config_getBool(DOT_CLEANUP)) +- { +- QDir d; +- d.remove(dotName); +- } +-} +- + static bool insertMapFile(FTextStream &out,const QCString &mapFile, + const QCString &relPath,const QCString &mapLabel) + { +@@ -108,7 +99,7 @@ static bool insertMapFile(FTextStream &out,const QCString &mapFile, + QCString DotGraph::imgName() const + { + return m_baseName + ((m_graphFormat == GOF_BITMAP) ? +- ("." + getDotImageExtension()) : (Config_getBool(USE_PDFLATEX) ? ".pdf" : ".eps")); ++ ("." + getDotImageExtension()) : (Config_getBool(USE_PDFLATEX) ? ".pdf" : ".eps")); + } + + QCString DotGraph::writeGraph( +@@ -166,7 +157,6 @@ bool DotGraph::prepareDotFile() + ) + { + // all needed files are there +- removeDotGraph(absDotName()); + return FALSE; + } + diff --git a/doxygen-1.8.18-memory-leaks.patch b/doxygen-1.8.18-memory-leaks.patch new file mode 100644 index 0000000..b45895a --- /dev/null +++ b/doxygen-1.8.18-memory-leaks.patch @@ -0,0 +1,66 @@ +commit 30f8609975062896b0cd43b739310ab8d667ea82 +Author: Dimitri van Heesch +Date: Sun Apr 26 20:44:17 2020 +0200 + + Fixed 2 small memory leaks + +diff --git a/src/doxygen.cpp b/src/doxygen.cpp +index 1d15a91b..2ceece91 100644 +--- a/src/doxygen.cpp ++++ b/src/doxygen.cpp +@@ -1900,25 +1900,22 @@ static void findUsingDeclImports(const Entry *root) + if (md && md->protection()!=Private) + { + //printf("found member %s\n",mni->memberName()); +- MemberDef *newMd = 0; ++ QCString fileName = root->fileName; ++ if (fileName.isEmpty() && root->tagInfo()) + { +- QCString fileName = root->fileName; +- if (fileName.isEmpty() && root->tagInfo()) +- { +- fileName = root->tagInfo()->tagName; +- } +- const ArgumentList &templAl = md->templateArguments(); +- const ArgumentList &al = md->templateArguments(); +- newMd = createMemberDef( +- fileName,root->startLine,root->startColumn, +- md->typeString(),memName,md->argsString(), +- md->excpString(),root->protection,root->virt, +- md->isStatic(),Member,md->memberType(), +- templAl,al,root->metaData +- ); ++ fileName = root->tagInfo()->tagName; + } ++ const ArgumentList &templAl = md->templateArguments(); ++ const ArgumentList &al = md->templateArguments(); ++ std::unique_ptr newMd { createMemberDef( ++ fileName,root->startLine,root->startColumn, ++ md->typeString(),memName,md->argsString(), ++ md->excpString(),root->protection,root->virt, ++ md->isStatic(),Member,md->memberType(), ++ templAl,al,root->metaData ++ ) }; + newMd->setMemberClass(cd); +- cd->insertMember(newMd); ++ cd->insertMember(newMd.get()); + if (!root->doc.isEmpty() || !root->brief.isEmpty()) + { + newMd->setDocumentation(root->doc,root->docFile,root->docLine); +@@ -1946,6 +1943,8 @@ static void findUsingDeclImports(const Entry *root) + newMd->setMemberSpecifiers(md->getMemberSpecifiers()); + newMd->setLanguage(root->lang); + newMd->setId(root->id); ++ MemberName *mn = Doxygen::memberNameLinkedMap->add(memName); ++ mn->push_back(std::move(newMd)); + } + } + } +@@ -9739,6 +9738,7 @@ void initDoxygen() + Doxygen::exampleSDict->setAutoDelete(TRUE); + Doxygen::memGrpInfoDict.setAutoDelete(TRUE); + Doxygen::tagDestinationDict.setAutoDelete(TRUE); ++ Doxygen::namespaceAliasDict.setAutoDelete(TRUE); + Doxygen::dirRelations.setAutoDelete(TRUE); + Doxygen::genericsDict = new GenericsSDict; + Doxygen::indexList = new IndexList; diff --git a/doxygen.spec b/doxygen.spec index 161085b..d5af7a8 100644 --- a/doxygen.spec +++ b/doxygen.spec @@ -8,8 +8,8 @@ Summary: A documentation system for C/C++ Name: doxygen Epoch: 1 -Version: 1.8.17 -Release: 3%{?dist} +Version: 1.8.18 +Release: 1%{?dist} # No version is specified. License: GPL+ @@ -19,8 +19,9 @@ Source0: http://doxygen.nl/files/%{name}-%{version}.src.tar.gz Source1: doxywizard.desktop # upstream patches -Patch0: doxgen-1.8.17-broken-urls-in-the-xml-output.patch -Patch1: doxygen-1.8.17-test-suite-is-failing.patch +Patch0: doxygen-1.8.17-buffer-overflow.patch +Patch1: doxygen-1.8.18-memory-leaks.patch +Patch3: doxygen-1.8.18-md5-hash-does-not-match-for-two-different-runs.patch BuildRequires: %{_bindir}/python3 BuildRequires: ImageMagick @@ -198,6 +199,11 @@ make tests -C %{BuildDir} %endif %changelog +* Mon May 25 2020 Than Ngo - 1.8.18-1 +- update to 1.8.18 +- backport fixes: buffer-overflow, memory leeks and md5 hash does not match for + 2 diffferent runs + * Thu Apr 02 2020 Björn Esser - 1:1.8.17-3 - Fix string quoting for rpm >= 4.16 diff --git a/sources b/sources index f30c052..bc67412 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (doxygen-1.8.17.src.tar.gz) = 98869f60eb1eeb48a7d75993de7e19151665797441364532f86382dc19a9db6b71049cf697592cb321391991120868f4e25b4c3e80f2a0f2b3c70b71d90be7b6 +SHA512 (doxygen-1.8.18.src.tar.gz) = 0be26f58e33e564318629bedefb1257f478bfcb78f6a363b066d46ff6e457c15e79fe8d5c36032ee3f9b200cca91690166c388234ba6a28b6669f19af364eed5