[PATCH] Initialize IO_STATUS_BLOCK for pread, pwrite
Mark Geisert
mark@maxrnd.com
Tue Nov 28 07:54:00 GMT 2017
---
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
More information about the Cygwin-patches
mailing list