diff options
author | Gustavo André dos Santos Lopes <cataphract@php.net> | 2010-11-05 18:53:48 +0000 |
---|---|---|
committer | Gustavo André dos Santos Lopes <cataphract@php.net> | 2010-11-05 18:53:48 +0000 |
commit | d37e1ea243ed78e9e925420080b8c8777399c95d (patch) | |
tree | e8b6a057cb4dadc2ff02928221013007908a2c42 /main/streams/php_streams_int.h | |
parent | 6bc20667c7bbea2c2040038031bda0bb7cfd2f4a (diff) | |
download | php-git-d37e1ea243ed78e9e925420080b8c8777399c95d.tar.gz |
- Renamed php_stream_rep_nonstand_mode to
php_stream_mode_sanitize_fdopen_fopencookie, made it not
exported and movied it from php_streams.h to
php_streams_int.h.
Diffstat (limited to 'main/streams/php_streams_int.h')
-rw-r--r-- | main/streams/php_streams_int.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/main/streams/php_streams_int.h b/main/streams/php_streams_int.h index 273d85eefb..b0242c8884 100644 --- a/main/streams/php_streams_int.h +++ b/main/streams/php_streams_int.h @@ -59,6 +59,13 @@ #define S_ISREG(mode) (((mode)&S_IFMT) == S_IFREG) #endif +/* This functions transforms the first char to 'w' if it's not 'r', 'a' or 'w' + * and strips any subsequent chars except '+' and 'b'. + * Use this to sanitize stream->mode if you call e.g. fdopen, fopencookie or + * any other function that expects standard modes and you allow non-standard + * ones. result should be a char[5]. */ +void php_stream_mode_sanitize_fdopen_fopencookie(php_stream *stream, char *result); + void php_stream_tidy_wrapper_error_log(php_stream_wrapper *wrapper TSRMLS_DC); void php_stream_display_wrapper_errors(php_stream_wrapper *wrapper, const char *path, const char *caption TSRMLS_DC); |