This is the mail archive of the
cygwin-patches
mailing list for the Cygwin project.
[PATCH] Initialize IO_STATUS_BLOCK for pread, pwrite
- From: Mark Geisert <mark at maxrnd dot com>
- To: cygwin-patches at cygwin dot com
- Cc: Mark Geisert <mark at maxrnd dot com>
- Date: Mon, 27 Nov 2017 23:53:57 -0800
- Subject: [PATCH] Initialize IO_STATUS_BLOCK for pread, pwrite
- Authentication-results: sourceware.org; auth=none
---
winsup/cygwin/fhandler_disk_file.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc
index 5dfcae4d9..2ead9948c 100644
--- a/winsup/cygwin/fhandler_disk_file.cc
+++ b/winsup/cygwin/fhandler_disk_file.cc
@@ -1548,7 +1548,7 @@ fhandler_disk_file::pread (void *buf, size_t count, off_t offset)
{
extern int __stdcall is_at_eof (HANDLE h);
NTSTATUS status;
- IO_STATUS_BLOCK io;
+ IO_STATUS_BLOCK io = {{0}, 0};
LARGE_INTEGER off = { QuadPart:offset };
if (!prw_handle && prw_open (false))
@@ -1630,7 +1630,7 @@ fhandler_disk_file::pwrite (void *buf, size_t count, off_t offset)
if (wbinary () && !mandatory_locking ())
{
NTSTATUS status;
- IO_STATUS_BLOCK io;
+ IO_STATUS_BLOCK io = {{0}, 0};
LARGE_INTEGER off = { QuadPart:offset };
if (!prw_handle && prw_open (true))
--
2.15.0