[vlc-devel] [PATCH] block: do not use pass uninitialized data to ReadFile()
Steve Lhomme
robux4 at videolabs.io
Wed Apr 5 14:55:10 CEST 2017
All the others fields were uninitialized causing ReadFile() to fail.
---
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 950f4068bd..10bd5c5588 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
--
2.11.1
More information about the vlc-devel
mailing list