mirror of
https://github.com/php/php-src.git
synced 2026-03-28 02:02:32 +01:00
- Enforce stream mode correct
This commit is contained in:
@@ -656,6 +656,13 @@ static php_stream * php_stream_url_wrap_rfc2397(php_stream_wrapper *wrapper, cha
|
||||
/* store data */
|
||||
php_stream_temp_write(stream, comma, dlen TSRMLS_CC);
|
||||
php_stream_temp_seek(stream, 0, SEEK_SET, &newoffs TSRMLS_CC);
|
||||
/* set special stream stuff (enforce exact mode) */
|
||||
vlen = strlen(mode);
|
||||
if (vlen >= sizeof(stream->mode)) {
|
||||
vlen = sizeof(stream->mode) - 1;
|
||||
}
|
||||
memcpy(stream->mode, mode, vlen);
|
||||
stream->mode[vlen] = '\0';
|
||||
stream->ops = &php_stream_rfc2397_ops;
|
||||
ts = (php_stream_temp_data*)stream->abstract;
|
||||
assert(ts != NULL);
|
||||
|
||||
Reference in New Issue
Block a user