Browse Source

Make sure p is not pointing to the start of the buffer

experimental/5.2-WITH_DRCP
Ilia Alshanetsky 20 years ago
parent
commit
fc49f98e6a
  1. 2
      ext/standard/string.c

2
ext/standard/string.c

@ -4263,7 +4263,7 @@ PHPAPI size_t php_strip_tags_ex(char *rbuf, int len, int *stateptr, char *allow,
tp = ((tp-tbuf) >= PHP_TAG_BUF_SIZE ? tbuf: tp);
*(tp++) = c;
}
if (*(p-1) != '\\') {
if (p != buf && *(p-1) != '\\') {
in_q = !in_q;
}
break;

Loading…
Cancel
Save