From fb738d95bf963dbb6f097b61e5de946636303dfd Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Sun, 3 Feb 2008 16:14:44 +0000 Subject: [PATCH] MFB: Fixed bug #44028 (crash inside stream_socket_enable_crypto() when enabling encryption without crypto type) --- ext/standard/streamsfuncs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ext/standard/streamsfuncs.c b/ext/standard/streamsfuncs.c index 4ad46d4ff9..98671a8501 100644 --- a/ext/standard/streamsfuncs.c +++ b/ext/standard/streamsfuncs.c @@ -1487,6 +1487,9 @@ PHP_FUNCTION(stream_socket_enable_crypto) if (php_stream_xport_crypto_setup(stream, cryptokind, sessstream TSRMLS_CC) < 0) { RETURN_FALSE; } + } else if (enable) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "When enabling encryption you must specify the crypto type"); + RETURN_FALSE; } ret = php_stream_xport_crypto_enable(stream, enable TSRMLS_CC); -- 2.50.1