[libbluray-devel] win32: fix pread() emulation

Petri Hintukainen git at videolan.org
Wed Jan 13 08:50:13 CET 2016


libudfread | branch: master | Petri Hintukainen <phintuka at gmail.com> | Wed Jan 13 09:26:06 2016 +0200| [a910bc465b74dad7673ae9df28d91f121fbe3bef] | committer: Petri Hintukainen

win32: fix pread() emulation

Make sure all fields of OVERLAPPED structure are properly initialized.

> http://git.videolan.org/gitweb.cgi/libudfread.git/?a=commit;h=a910bc465b74dad7673ae9df28d91f121fbe3bef
---

 src/default_blockinput.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/src/default_blockinput.c b/src/default_blockinput.c
index 7a3f6ba..63bebaf 100644
--- a/src/default_blockinput.c
+++ b/src/default_blockinput.c
@@ -60,6 +60,7 @@ static ssize_t pread(int fd, void *buf, size_t count, off_t offset)
         return -1;
     }
 
+    memset(&ov, 0, sizeof(ov));
     ov.Offset     = offset;
     ov.OffsetHigh = (offset >> 32);
     if (!ReadFile(handle, buf, count, &got, &ov)) {



More information about the libbluray-devel mailing list