summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2011-08-24 12:51:40 +0200
committerOndřej Surý <ondrej@sury.org>2011-08-24 12:51:40 +0200
commit8f8cd52ec2b7a2da7821f14103623477444870be (patch)
tree0f75468803badc5653e48d63174cc5643497c8d2 /ext
parentf452a2b3e4e4279b27594a8ddb66525442d59227 (diff)
downloadphp-8f8cd52ec2b7a2da7821f14103623477444870be.tar.gz
Imported Upstream version 5.3.8
Diffstat (limited to 'ext')
-rw-r--r--ext/openssl/xp_ssl.c39
-rw-r--r--ext/standard/php_crypt_r.c4
2 files changed, 3 insertions, 40 deletions
diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c
index edbfe3f3d..0cc04cbe7 100644
--- a/ext/openssl/xp_ssl.c
+++ b/ext/openssl/xp_ssl.c
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: xp_ssl.c 313616 2011-07-23 01:29:44Z scottmac $ */
+/* $Id: xp_ssl.c 315339 2011-08-23 08:12:58Z johannes $ */
#include "php.h"
#include "ext/standard/file.h"
@@ -204,36 +204,6 @@ static size_t php_openssl_sockop_write(php_stream *stream, const char *buf, size
return didwrite;
}
-static void php_openssl_stream_wait_for_data(php_stream *stream, php_netstream_data_t *sock TSRMLS_DC)
-{
- int retval;
- struct timeval *ptimeout;
-
- if (sock->socket == -1) {
- return;
- }
-
- sock->timeout_event = 0;
-
- if (sock->timeout.tv_sec == -1)
- ptimeout = NULL;
- else
- ptimeout = &sock->timeout;
-
- while(1) {
- retval = php_pollfd_for(sock->socket, PHP_POLLREADABLE, ptimeout);
-
- if (retval == 0)
- sock->timeout_event = 1;
-
- if (retval >= 0)
- break;
-
- if (php_socket_errno() != EINTR)
- break;
- }
-}
-
static size_t php_openssl_sockop_read(php_stream *stream, char *buf, size_t count TSRMLS_DC)
{
php_openssl_netstream_data_t *sslsock = (php_openssl_netstream_data_t*)stream->abstract;
@@ -243,13 +213,6 @@ static size_t php_openssl_sockop_read(php_stream *stream, char *buf, size_t coun
int retry = 1;
do {
- if (sslsock->s.is_blocked) {
- php_openssl_stream_wait_for_data(stream, &(sslsock->s) TSRMLS_CC);
- if (sslsock->s.timeout_event) {
- break;
- }
- /* there is no guarantee that there is application data available but something is there */
- }
nr_bytes = SSL_read(sslsock->ssl_handle, buf, count);
if (nr_bytes <= 0) {
diff --git a/ext/standard/php_crypt_r.c b/ext/standard/php_crypt_r.c
index a1e0f3229..86076e8bf 100644
--- a/ext/standard/php_crypt_r.c
+++ b/ext/standard/php_crypt_r.c
@@ -1,4 +1,4 @@
-/* $Id: php_crypt_r.c 314438 2011-08-07 16:10:34Z rasmus $ */
+/* $Id: php_crypt_r.c 315338 2011-08-23 08:09:55Z johannes $ */
/*
+----------------------------------------------------------------------+
| PHP Version 5 |
@@ -382,7 +382,7 @@ char * php_md5_crypt_r(const char *pw, const char *salt, char *out)
/* Now make the output string */
memcpy(passwd, MD5_MAGIC, MD5_MAGIC_LEN);
strlcpy(passwd + MD5_MAGIC_LEN, sp, sl + 1);
- strlcat(passwd, "$", 1);
+ strcat(passwd, "$");
PHP_MD5Final(final, &ctx);