fixed doxygen 1.8.15 segfault

This commit is contained in:
Than Ngo 2019-02-12 14:10:11 +01:00
parent 135737fac1
commit 32e3f8ab66
2 changed files with 57 additions and 1 deletions

View File

@ -0,0 +1,52 @@
commit c26c5fc4fb852098c7188e7762778c87a50771cb
Author: albert-github <albert.tests@gmail.com>
Date: Mon Jan 7 18:48:13 2019 +0100
issue #6749 doxygen 1.8.15 segfault
An empty string was defined in a `<a href="">` resulting in a null pointer access.
diff --git a/src/util.cpp b/src/util.cpp
index f9c2492f..9a0e513b 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -5444,6 +5444,7 @@ QCString escapeCharsInString(const char *name,bool allowDots,bool allowUnderscor
static bool allowUnicodeNames = Config_getBool(ALLOW_UNICODE_NAMES);
static GrowBuf growBuf;
growBuf.clear();
+ if (name==0) return "";
char c;
const char *p=name;
while ((c=*p++)!=0)
@@ -6962,6 +6963,7 @@ void filterLatexString(FTextStream &t,const char *str,
QCString latexEscapeLabelName(const char *s)
{
+ if (s==0) return "";
QGString result;
QCString tmp(qstrlen(s)+1);
FTextStream t(&result);
@@ -6999,6 +7001,7 @@ QCString latexEscapeLabelName(const char *s)
QCString latexEscapeIndexChars(const char *s)
{
+ if (s==0) return "";
QGString result;
QCString tmp(qstrlen(s)+1);
FTextStream t(&result);
@@ -7037,6 +7040,7 @@ QCString latexEscapeIndexChars(const char *s)
QCString latexEscapePDFString(const char *s)
{
+ if (s==0) return "";
QGString result;
FTextStream t(&result);
const char *p=s;
@@ -7061,6 +7065,7 @@ QCString latexEscapePDFString(const char *s)
QCString latexFilterURL(const char *s)
{
+ if (s==0) return "";
QGString result;
FTextStream t(&result);
const char *p=s;

View File

@ -8,7 +8,7 @@ Summary: A documentation system for C/C++
Name: doxygen
Epoch: 1
Version: 1.8.15
Release: 4%{?dist}
Release: 5%{?dist}
# No version is specified.
License: GPL+
@ -22,6 +22,7 @@ Source2: doxywizard.desktop
Patch0: doxygen-1.8.15-handle_empty_TOC_in_XML_output.patch
Patch1: doxygen-1.8.15-test_for_XML_output_with_an_empty_TOC.patch
Patch2: doxygen-1.8.15-inconsistent_whitespace_removal_for_operators.patch
Patch3: doxygen-1.8.15-crash.patch
BuildRequires: gcc-c++ gcc
BuildRequires: perl-interpreter
@ -186,6 +187,9 @@ make tests -C %{_target_platform}
%endif
%changelog
* Tue Feb 12 2019 Than Ngo <than@redhat.com> - 1:1.8.15-5
- fixed bz#1675288, doxygen 1.8.15 segfault
* Fri Feb 08 2019 Than Ngo <than@redhat.com> - 1:1.8.15-4
- fixed bz#673228 - operator whitespace changes cause wxpython FTBFS
- fixed bz#1673230 - BR on tex(newunicodechar.sty) in doxygen-latex