CrashSender Fails Sending Files Still Open

22 views
Skip to first unread message

a For

unread,
Feb 9, 2016, 7:59:50 PM2/9/16
to Crashrpt
In every usage of CreateFile() in the CrashSender it fails to open files that may be still open (log files etc.) even if they were open for sharing like log files typically are.  The bug is CreateFile() requires both (FILE_SHARE_READ | FILE_SHARE_WRITE) instead of just (FILE_SHARE_READ) for its permission parameter. Win32 API is entirely counter-intuitive but FILE_SHARE_WRITE means let me open files that were created by someone else who opened it with sharing for write.

All the places this is used incorrectly are:

CrashInfoReader.cpp line 34
CrashInfoReader.cpp line 335
CrashInfoReader.cpp line 1428
ErrorReportSender.cpp line 1862
FilePreviewCtrl.cpp line 62
HttpRequestSender.cpp line 487
HttpRequestSender.cpp line 690


Reply all
Reply to author
Forward
0 new messages