diff options
author | albert-github <albert.tests@gmail.com> | 2018-11-05 11:07:47 (GMT) |
---|---|---|
committer | albert-github <albert.tests@gmail.com> | 2018-11-05 11:07:47 (GMT) |
commit | efc33490c36cb7c21955901ce0abccc343c0c7b3 (patch) | |
tree | 2fc45af19faf44cf990dd8fbad665f6deea5f162 | |
parent | 9440d7ce0b31749b6bbb13e70e2f7ed501505c7e (diff) | |
download | Doxygen-efc33490c36cb7c21955901ce0abccc343c0c7b3.zip Doxygen-efc33490c36cb7c21955901ce0abccc343c0c7b3.tar.gz Doxygen-efc33490c36cb7c21955901ce0abccc343c0c7b3.tar.bz2 |
issue_6597 SIGSEGV presumably caused by C++ "using" declaration
Crash appears in in the autogen / permod and sqlite3 code generation. In the xml code generation the problem does not appear due to the protection against the NULL pointer.
Added protection on the other places as well
-rw-r--r-- | src/defgen.cpp | 2 | ||||
-rw-r--r-- | src/perlmodgen.cpp | 2 | ||||
-rw-r--r-- | src/sqlite3gen.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/defgen.cpp b/src/defgen.cpp index cd69ab2..3ab311c 100644 --- a/src/defgen.cpp +++ b/src/defgen.cpp @@ -146,7 +146,7 @@ void generateDEFForMember(MemberDef *md, stringToArgumentList(md->argsString(),declAl); QCString fcnPrefix = " " + memPrefix + "param-"; - if (declAl->count()>0) + if (defAl && declAl->count()>0) { ArgumentListIterator declAli(*declAl); ArgumentListIterator defAli(*defAl); diff --git a/src/perlmodgen.cpp b/src/perlmodgen.cpp index 5b4b6ea..ab55bfa 100644 --- a/src/perlmodgen.cpp +++ b/src/perlmodgen.cpp @@ -1609,7 +1609,7 @@ void PerlModGenerator::generatePerlModForMember(MemberDef *md,Definition *) m_output.openList("parameters"); ArgumentList *declAl = md->declArgumentList(); ArgumentList *defAl = md->argumentList(); - if (declAl && declAl->count()>0) + if (declAl && defAl && declAl->count()>0) { ArgumentListIterator declAli(*declAl); ArgumentListIterator defAli(*defAl); diff --git a/src/sqlite3gen.cpp b/src/sqlite3gen.cpp index a7d7f21..a7b8dbb 100644 --- a/src/sqlite3gen.cpp +++ b/src/sqlite3gen.cpp @@ -1017,7 +1017,7 @@ static void insertMemberFunctionParams(int memberdef_id, const MemberDef *md, co { ArgumentList *declAl = md->declArgumentList(); ArgumentList *defAl = md->argumentList(); - if (declAl!=0 && declAl->count()>0) + if (declAl!=0 && defAl!=0 && declAl->count()>0) { ArgumentListIterator declAli(*declAl); ArgumentListIterator defAli(*defAl); |