diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2016-08-27 01:02:58 +0200 |
---|---|---|
committer | Christoph M. Becker <cmbecker69@gmx.de> | 2016-08-27 01:12:01 +0200 |
commit | 2139918ea6f5088e9ed5daa734568b4a50217f52 (patch) | |
tree | b070de9641e20d52d8f06b99ff1c9caf1879637b /ext/standard/browscap.c | |
parent | 84512a117789563a64172115c648944538006a69 (diff) | |
download | php-git-2139918ea6f5088e9ed5daa734568b4a50217f52.tar.gz |
Fix #65550: get_browser() incorrectly parsers entries with "+" sign
+ signs in the browscap patterns are meant to be literal characters, so we
have to escape them for the regex matching.
Diffstat (limited to 'ext/standard/browscap.c')
-rw-r--r-- | ext/standard/browscap.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/standard/browscap.c b/ext/standard/browscap.c index 2b75135640..36def71838 100644 --- a/ext/standard/browscap.c +++ b/ext/standard/browscap.c @@ -123,6 +123,10 @@ static void convert_browscap_pattern(zval *pattern, int persistent) /* {{{ */ t[j++] = '\\'; t[j] = '~'; break; + case '+': + t[j++] = '\\'; + t[j] = '+'; + break; default: t[j] = Z_STRVAL_P(pattern)[i]; break; |