diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2021-03-26 19:54:08 (GMT) |
---|---|---|
committer | Dimitri van Heesch <doxygen@gmail.com> | 2021-03-26 19:54:08 (GMT) |
commit | 275a09db0ff8188191f3ac0353a5f22627d87fe5 (patch) | |
tree | df5daafb7ab1dd373a510398bb44dd446f1f09f8 /src/vhdldocgen.cpp | |
parent | 15c390fca901e24b426ea39eea95f32d5e4ee84e (diff) | |
download | Doxygen-275a09db0ff8188191f3ac0353a5f22627d87fe5.zip Doxygen-275a09db0ff8188191f3ac0353a5f22627d87fe5.tar.gz Doxygen-275a09db0ff8188191f3ac0353a5f22627d87fe5.tar.bz2 |
Fix out of bounds issue in VHDL processing
Diffstat (limited to 'src/vhdldocgen.cpp')
-rw-r--r-- | src/vhdldocgen.cpp | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/src/vhdldocgen.cpp b/src/vhdldocgen.cpp index 7d3e000..47b406d 100644 --- a/src/vhdldocgen.cpp +++ b/src/vhdldocgen.cpp @@ -858,8 +858,11 @@ void VhdlDocGen::writeInlineClassLink(const ClassDef* cd ,OutputList& ol) else if (ii==VhdlDocGen::ARCHITECTURE) { StringVector qlist=split(nn.str(),"-"); - nn=qlist[1]; - cd=VhdlDocGen::getClass(nn.data()); + if (qlist.size()>1) + { + nn=qlist[1]; + cd=VhdlDocGen::getClass(nn.data()); + } } QCString opp; @@ -869,14 +872,17 @@ void VhdlDocGen::writeInlineClassLink(const ClassDef* cd ,OutputList& ol) for (const auto &s : ql) { StringVector qlist=split(s.str(),"-"); - QCString s1=qlist[0]; - QCString s2=qlist[1]; - s1.stripPrefix("_"); - if (ql.size()==1) s1.resize(0); - ClassDef *cc = getClass(s); - if (cc) + if (qlist.size()>2) { - VhdlDocGen::writeVhdlLink(cc,ol,type,s2,s1); + QCString s1=qlist[0]; + QCString s2=qlist[1]; + s1.stripPrefix("_"); + if (ql.size()==1) s1.resize(0); + ClassDef *cc = getClass(s); + if (cc) + { + VhdlDocGen::writeVhdlLink(cc,ol,type,s2,s1); + } } } } @@ -919,7 +925,7 @@ const ClassDef* VhdlDocGen::findArchitecture(const ClassDef *cd) StringVector ql=split(jj.str(),":"); if (ql.size()>1) { - if (ql[0]==nn ) + if (ql[0]==nn) { return citer.get(); } |