From cef0076a88a968273d8df0fc451ceca42a6ebc68 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Mon, 19 Apr 2021 13:46:18 +0100 Subject: [PATCH] Signal that the stream option passed is an error Otherwise this falls through to the next case statement. --- main/streams/plain_wrapper.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main/streams/plain_wrapper.c b/main/streams/plain_wrapper.c index c3ea41aef07..75f8dc67c37 100644 --- a/main/streams/plain_wrapper.c +++ b/main/streams/plain_wrapper.c @@ -918,6 +918,8 @@ static int php_stdiop_set_option(php_stream *stream, int option, int value, void case PHP_STREAM_SYNC_FDSYNC: return php_stdiop_sync(stream, 1) == 0 ? PHP_STREAM_OPTION_RETURN_OK : PHP_STREAM_OPTION_RETURN_ERR; } + /* Invalid option passed */ + return PHP_STREAM_OPTION_RETURN_ERR; case PHP_STREAM_OPTION_TRUNCATE_API: switch (value) {