Branch: refs/heads/master Author: Colomban Wendling ban@herbesfolles.org Committer: Colomban Wendling ban@herbesfolles.org Date: Sun, 14 Jul 2013 22:59:56 UTC Commit: 66396e7ca7e892d734daf9b6579b3dce9a742548 https://github.com/geany/geany/commit/66396e7ca7e892d734daf9b6579b3dce9a7425...
Log Message: ----------- PHP: Fix infinite loop reading an identifier ending at EOF
Bit-wise operation is inappropriate here because `c` might be negative, since EOF is generally represented as -1. Since -1 is stored as all bits at 1 on most common architectures, the test will evaluate to true, hence entering an infinite loop.
Modified Paths: -------------- tagmanager/ctags/php.c
Modified: tagmanager/ctags/php.c 2 files changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -498,7 +498,7 @@ static void addToScope (tokenInfo *const token, const vString *const extra)
static boolean isIdentChar (const int c) { - return (isalnum (c) || c == '_' || c & 0x80); + return (isalnum (c) || c == '_' || c >= 0x80); }
static int skipToCharacter (const int c)
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).