Browse Source

Fixed heap overflow

experimental/5.2-WITH_DRCP
Dmitry Stogov 20 years ago
parent
commit
5436160dc6
  1. 3
      main/streams/filter.c

3
main/streams/filter.c

@ -265,7 +265,8 @@ PHPAPI php_stream_filter *php_stream_filter_create(const char *filtername, zval
/* try a wildcard */
char *wildname;
wildname = estrdup(filtername);
wildname = emalloc(n+3);
memcpy(wildname, filtername, n+1);
period = wildname + (period - filtername);
while (period && !filter) {
*period = '\0';

Loading…
Cancel
Save