wez Mon Nov 18 07:40:12 2002 EDT Modified files: /php4/main php_open_temporary_file.c memory_streams.c Log: wb -> r+b Index: php4/main/php_open_temporary_file.c diff -u php4/main/php_open_temporary_file.c:1.19 php4/main/php_open_temporary_file.c:1.20 --- php4/main/php_open_temporary_file.c:1.19 Mon Nov 18 06:49:06 2002 +++ php4/main/php_open_temporary_file.c Mon Nov 18 07:40:12 2002 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_open_temporary_file.c,v 1.19 2002/11/18 11:49:06 wez Exp $ */ +/* $Id: php_open_temporary_file.c,v 1.20 2002/11/18 12:40:12 wez Exp $ */ #include "php.h" @@ -149,7 +149,7 @@ if (fd==-1) { fp = NULL; } else { - fp = fdopen(fd, "wb"); + fp = fdopen(fd, "r+b"); } #else if (mktemp(opened_path)) { Index: php4/main/memory_streams.c diff -u php4/main/memory_streams.c:1.20 php4/main/memory_streams.c:1.21 --- php4/main/memory_streams.c:1.20 Sun Oct 20 19:05:34 2002 +++ php4/main/memory_streams.c Mon Nov 18 07:40:12 2002 @@ -221,7 +221,7 @@ self->smax = -1; self->mode = mode; - stream = php_stream_alloc(&php_stream_memory_ops, self, 0, "rwb"); + stream = php_stream_alloc(&php_stream_memory_ops, self, 0, "r+b"); stream->flags |= PHP_STREAM_FLAG_NO_BUFFER; return stream; } @@ -434,7 +434,7 @@ assert(self != NULL); self->smax = max_memory_usage; self->mode = mode; - stream = php_stream_alloc(&php_stream_temp_ops, self, 0, "rwb"); + stream = php_stream_alloc(&php_stream_temp_ops, self, 0, "r+b"); stream->flags |= PHP_STREAM_FLAG_NO_BUFFER; self->innerstream = php_stream_memory_create(mode);
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php