summaryrefslogtreecommitdiff
path: root/main/streams/php_streams_int.h
diff options
context:
space:
mode:
Diffstat (limited to 'main/streams/php_streams_int.h')
-rw-r--r--main/streams/php_streams_int.h7
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);