diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2020-01-18 14:58:16 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-18 14:58:16 (GMT) |
commit | 7a976e9bca2488ba2a06510947974f74ca074afc (patch) | |
tree | 0364134c643787ce2b939aa94d53a4da74c9ba21 | |
parent | eb365849aa3c539e5ed13bc4b3f1e76a4f4421d6 (diff) | |
parent | a73a6388956714f4a0dbd07259d0aa1ed4ddaf03 (diff) | |
download | Doxygen-7a976e9bca2488ba2a06510947974f74ca074afc.zip Doxygen-7a976e9bca2488ba2a06510947974f74ca074afc.tar.gz Doxygen-7a976e9bca2488ba2a06510947974f74ca074afc.tar.bz2 |
Merge pull request #7523 from albert-github/feature/bug_illegal_m
Crash of doxygen on not understood code
-rw-r--r-- | src/doxygen.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/doxygen.cpp b/src/doxygen.cpp index e32f8da..3c0afe5 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -2612,11 +2612,13 @@ static void addVariable(const Entry *root,int isFuncPtr=-1) type=name; static const QRegExp reName("[a-z_A-Z][a-z_A-Z0-9]*"); int l=0; + int j=0; int i=args.isEmpty() ? -1 : reName.match(args,0,&l); if (i!=-1) { name=args.mid(i,l); - args=args.mid(i+l,args.find(')',i+l)-i-l); + j=args.find(')',i+l)-i-l; + if (j >= 0) args=args.mid(i+l,j); } //printf("new: type='%s' name='%s' args='%s'\n", // type.data(),name.data(),args.data()); |