diff options
Diffstat (limited to 'ext/standard/info.c')
| -rw-r--r-- | ext/standard/info.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/ext/standard/info.c b/ext/standard/info.c index 12cad0e948..3a521ef3d0 100644 --- a/ext/standard/info.c +++ b/ext/standard/info.c @@ -439,10 +439,7 @@ PHPAPI void php_print_info(int flag TSRMLS_DC) for (zend_hash_internal_pointer_reset(url_stream_wrappers_hash); zend_hash_get_current_key_ex(url_stream_wrappers_hash, &stream_protocol, &stream_protocol_len, NULL, 0, NULL) == HASH_KEY_IS_STRING; zend_hash_move_forward(url_stream_wrappers_hash)) { - if (NULL == (stream_protocols_buf = erealloc(stream_protocols_buf, - stream_protocols_buf_len + stream_protocol_len + 2 /* ", " */ + 1 /* 0 byte at end */))) { - break; - } + stream_protocols_buf = erealloc(stream_protocols_buf, stream_protocols_buf_len + stream_protocol_len + 2 + 1); memcpy(stream_protocols_buf + stream_protocols_buf_len, stream_protocol, stream_protocol_len); stream_protocols_buf[stream_protocols_buf_len + stream_protocol_len] = ','; stream_protocols_buf[stream_protocols_buf_len + stream_protocol_len + 1] = ' '; |
