bareos: bareos-14.2 93e5f8f7

Author Committer Branch Timestamp Parent
mvwieringen mvwieringen bareos-14.2 2016-04-07 19:03 bareos-14.2 15659e4a 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