diff options
author | Felipe Pena <felipe@php.net> | 2008-10-10 12:10:41 +0000 |
---|---|---|
committer | Felipe Pena <felipe@php.net> | 2008-10-10 12:10:41 +0000 |
commit | 1f54af9245c35f2ffdc8c708da9c8552ecada4f8 (patch) | |
tree | 25acb551517f76cfc15feca97e6c65b9dbb2b2a7 /ext/pdo/pdo_sql_parser.re | |
parent | d77277c0e247e5d8d89d91e9a57aea8ed23d5995 (diff) | |
download | php-git-1f54af9245c35f2ffdc8c708da9c8552ecada4f8.tar.gz |
MFH:
- Fixed bug #44251 (Question mark and an escaped singel quote lead to an exception)
- Fixed bug #41125 (PDO mysql + quote() + prepare() can result in seg fault)
Patch by: tsteiner at nerdclub dot net
Diffstat (limited to 'ext/pdo/pdo_sql_parser.re')
-rw-r--r-- | ext/pdo/pdo_sql_parser.re | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/pdo/pdo_sql_parser.re b/ext/pdo/pdo_sql_parser.re index a2a8f34395..88fbb6055f 100644 --- a/ext/pdo/pdo_sql_parser.re +++ b/ext/pdo/pdo_sql_parser.re @@ -50,15 +50,15 @@ static int scan(Scanner *s) QUESTION = [?]; SPECIALS = [:?"']; MULTICHAR = [:?]; - EOF = [\000]; + EOF = [\000]; ANYNOEOF = [\001-\377]; */ /*!re2c - (["] ([^"])* ["]) { RET(PDO_PARSER_TEXT); } - (['] ([^'])* [']) { RET(PDO_PARSER_TEXT); } + (["](([\\]ANYNOEOF)|ANYNOEOF\["\\])*["]) { RET(PDO_PARSER_TEXT); } + (['](([\\]ANYNOEOF)|ANYNOEOF\['\\])*[']) { RET(PDO_PARSER_TEXT); } MULTICHAR{2,} { RET(PDO_PARSER_TEXT); } - BINDCHR { RET(PDO_PARSER_BIND); } + BINDCHR { RET(PDO_PARSER_BIND); } QUESTION { RET(PDO_PARSER_BIND_POS); } SPECIALS { SKIP_ONE(PDO_PARSER_TEXT); } (ANYNOEOF\SPECIALS)+ { RET(PDO_PARSER_TEXT); } |