From c41af569b2d64be974cf06725c695566429f2089 Mon Sep 17 00:00:00 2001
From: Steve Lhomme <robUx4@videolabs.io>
Date: Wed, 5 Apr 2017 14:55:10 +0200
Subject: [PATCH] block: do not use pass uninitialized data to ReadFile()

All the others fields were uninitialized causing ReadFile() to fail.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
---
 src/misc/block.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/misc/block.c b/src/misc/block.c
index 950f4068bd8a..10bd5c55887d 100644
--- a/src/misc/block.c
+++ b/src/misc/block.c
@@ -348,7 +348,7 @@ ssize_t pread (int fd, void *buf, size_t count, off_t offset)
     if (handle == INVALID_HANDLE_VALUE)
         return -1;
 
-    OVERLAPPED olap; olap.Offset = offset; olap.OffsetHigh = (offset >> 32);
+    OVERLAPPED olap = {.Offset = offset, .OffsetHigh = (offset >> 32)};
     DWORD written;
     /* This braindead API will override the file pointer even if we specify
      * an explicit read offset... So do not expect this to mix well with
-- 
GitLab