Skip to content

Commit

Permalink
issue #6749 doxygen 1.8.15 segfault
Browse files Browse the repository at this point in the history
An empty string was defined in a `<a href="">` resulting in a null pointer access.
  • Loading branch information
albert-github committed Jan 7, 2019
1 parent 62712c7 commit c26c5fc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit c26c5fc

Please sign in to comment.