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