[geany/geany] 99a509: python: Fix out of bounds access on unmatched Cython array declaration
Colomban Wendling
git-noreply at xxxxx
Wed Feb 11 17:22:55 UTC 2015
Branch: refs/heads/master
Author: Colomban Wendling <ban at herbesfolles.org>
Committer: Colomban Wendling <ban at herbesfolles.org>
Date: Wed, 11 Feb 2015 17:22:55 UTC
Commit: 99a509de7e6dce381e8bc23c5d080f8c8e5c5e12
https://github.com/geany/geany/commit/99a509de7e6dce381e8bc23c5d080f8c8e5c5e12
Log Message:
-----------
python: Fix out of bounds access on unmatched Cython array declaration
Modified Paths:
--------------
tagmanager/ctags/python.c
Modified: tagmanager/ctags/python.c
6 lines changed, 4 insertions(+), 2 deletions(-)
===================================================================
@@ -622,9 +622,11 @@ static const char *skipTypeDecl (const char *cp, boolean *is_class)
while (*ptr && *ptr != '=' && *ptr != '(' && !isspace(*ptr)) {
/* skip over e.g. 'cpdef numpy.ndarray[dtype=double, ndim=1]' */
if(*ptr == '[') {
- while(*ptr && *ptr != ']') ptr++;
+ while (*ptr && *ptr != ']') ptr++;
+ if (*ptr) ptr++;
+ } else {
+ ptr++;
}
- ptr++;
}
if (!*ptr || *ptr == '=') return NULL;
if (*ptr == '(') {
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
More information about the Commits
mailing list