Kaydet (Commit) 66396e7c authored tarafından Colomban Wendling's avatar Colomban Wendling

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.
üst 9ae90f3f
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment