summaryrefslogtreecommitdiffstats
path: root/src/doxygen.cpp
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2019-02-25 09:21:41 (GMT)
committeralbert-github <albert.tests@gmail.com>2019-02-25 09:21:41 (GMT)
commitbe1cceffdb3d8487f10fe7a354d360c52979edd3 (patch)
tree6d2d86b4bd1bc2e1778a929ee2565277e8762520 /src/doxygen.cpp
parent7c8994e18b57586f116ee223da9bac35b4262570 (diff)
downloadDoxygen-be1cceffdb3d8487f10fe7a354d360c52979edd3.zip
Doxygen-be1cceffdb3d8487f10fe7a354d360c52979edd3.tar.gz
Doxygen-be1cceffdb3d8487f10fe7a354d360c52979edd3.tar.bz2
Bug 645910 - Segfault on recursion while parsing "\subpage A" in "\page A"
In version 1.7.3 (till 1.8.7) the problem of direct recursion (i.e. in a page is a subpage to itself) we got a segmentation fault, as of 1.8.8 the problem went into an endless loop. The direct recursion is now detected.
Diffstat (limited to 'src/doxygen.cpp')
-rw-r--r--src/doxygen.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index caa13a6..47b16eb 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -8727,7 +8727,14 @@ static void computePageRelations(Entry *root)
for (bii.toFirst();(bi=bii.current());++bii)
{
PageDef *subPd = Doxygen::pageSDict->find(bi->name);
- if (subPd)
+ if (pd==subPd)
+ {
+ err("page defined at line %d of file %s with label %s is a direct "
+ "subpage of itself! Please remove this cyclic dependency.\n",
+ pd->docLine(),pd->docFile().data(),pd->name().data());
+ exit(1);
+ }
+ else if (subPd)
{
pd->addInnerCompound(subPd);
//printf("*** Added subpage relation: %s->%s\n",