bareos: master 93c4a5d0

Author Committer Branch Timestamp Parent
mvwieringen mvwieringen master 2016-04-07 19:03 master 048c47cc Pending
Affected Issues  0000640: File daemon crashed after restoring sparse file on windows
Changeset win32: Fix crash on restore of sparse files.

See
https://msdn.microsoft.com/en-us/library/windows/desktop/aa364596%28v=vs.85%29.aspx
[^] see we need to provide a bytesreturned variable
to the DeviceIoControl call when lpOverlapped is NULL

From the API page:

If lpOverlapped is NULL, lpBytesReturned cannot be NULL. Even when an
operation returns no output data and lpOutBuffer is NULL, DeviceIoControl
makes use of lpBytesReturned. After such an operation, the value of
lpBytesReturned is meaningless.

Fixes 0000640: File daemon crashed after restoring sparse file on windows
mod - src/win32/compat/compat.c Diff File