summaryrefslogtreecommitdiffstats
path: root/vhdlparser/vhdlparser.jj
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2019-12-08 10:18:56 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2019-12-08 10:18:56 (GMT)
commit6d4835dbe01a27923db8a1e4559b61da5065cb7a (patch)
tree9369a394c03978c79e20ec905cbd892e27fabdd6 /vhdlparser/vhdlparser.jj
parent4a4fcdf7931efba208a57b658185de689f2ef7fb (diff)
downloadDoxygen-6d4835dbe01a27923db8a1e4559b61da5065cb7a.zip
Doxygen-6d4835dbe01a27923db8a1e4559b61da5065cb7a.tar.gz
Doxygen-6d4835dbe01a27923db8a1e4559b61da5065cb7a.tar.bz2
Changed std::unique_ptr<Entry> to std::shared_ptr<Entry> at avoid use after free issues
Diffstat (limited to 'vhdlparser/vhdlparser.jj')
-rw-r--r--vhdlparser/vhdlparser.jj5
1 files changed, 2 insertions, 3 deletions
diff --git a/vhdlparser/vhdlparser.jj b/vhdlparser/vhdlparser.jj
index a3d6731..c602396 100644
--- a/vhdlparser/vhdlparser.jj
+++ b/vhdlparser/vhdlparser.jj
@@ -31,7 +31,7 @@ static Entry* current_root;
static Entry* tempEntry;
static Entry* lastEntity ;
static Entry* lastCompound ;
-static std::unique_ptr<Entry> current;
+static std::shared_ptr<Entry> current;
static QCString compSpec;
static QCString currName;
static int levelCounter;
@@ -42,7 +42,6 @@ static QCString forL;
static int param_sec ;
static int parse_sec;
static int currP;
-static Entry* currentCompound;
//----------------------------------------
@@ -1730,7 +1729,7 @@ void package_declaration(): {QCString s;}
<PACKAGE_T> s=identifier() <IS_T>
{
lastCompound=current.get();
- std::unique_ptr<Entry> clone=std::make_unique<Entry>(*current);
+ std::shared_ptr<Entry> clone=std::make_shared<Entry>(*current);
clone->section=Entry::NAMESPACE_SEC;
clone->spec=VhdlDocGen::PACKAGE;
clone->name=s;