[Doxygen-develop] segfault in addVariableToFile() in doxygen-1.4.6
Brought to you by:
dimitri
From: Michal M. <mm...@su...> - 2006-01-05 13:33:14
|
Hi, we found a bug in doxygen-1.4.6, which causes it to segfault sometimes (I couldn't create a simple testcase though). In 1.4.6, the following code was added to doxygen.cpp: + if (! // not a php array + (md->getFileDef() && getLanguageFromFileName(md->getFileDef()->name())==SrcLangExt_PHP) && + (md->argsString()!=root->args && root->args.find('[')!=-1) + ) + // not a php array variable + { ... however, this doesn't check the return value of md->getFileDef() (as it is done on other places). This seems to fix the segfault: --- src/doxygen.cpp +++ src/doxygen.cpp @@ -1912,7 +1912,7 @@ // variable already in the scope { if (! // not a php array - (getLanguageFromFileName(md->getFileDef()->name())==SrcLangExt_PHP) && + (md->getFileDef() && getLanguageFromFileName(md->getFileDef()->name())==SrcLangExt_PHP) && (md->argsString()!=root->args && root->args.find('[')!=-1) ) // not a php array variable Michal Marek SuSE CR |