]> granicus.if.org Git - php/commitdiff
Yet another check for php_strip_tags_ex()
authorChristoph M. Becker <cmbecker69@gmx.de>
Fri, 24 Jan 2020 11:45:04 +0000 (12:45 +0100)
committerChristoph M. Becker <cmbecker69@gmx.de>
Fri, 24 Jan 2020 11:50:24 +0000 (12:50 +0100)
ext/standard/string.c

index f443519a72931c789438cc78597255f6b9e237ef..38180106d547de9618e12f8709cf24cf26dba2bc 100644 (file)
@@ -5266,7 +5266,7 @@ state_2:
                        break;
                case '"':
                case '\'':
-                       if (*(p-1) != '\\') {
+                       if (p >= buf + 1 && *(p-1) != '\\') {
                                if (lc == c) {
                                        lc = '\0';
                                } else if (lc != '\\') {