Author: tthompson
Date: Sun Jun 12 04:02:52 2016
New Revision: 71616
URL: http://svn.reactos.org/svn/reactos?rev=71616&view=rev
Log:
[NTFS]
Add fixes to WriteAttribute():
-Remove erroneous check for end of run (before writing to the last run returned)
-Properly dereference RealLengthWritten pointer, as reported in CR-90
Modified:
branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/mft.c
Modified: branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/mft.c
URL: http://svn.reactos.org/svn/reactos/branches/GSoC_2016/NTFS/drivers/filesyst…
==============================================================================
--- branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/mft.c [iso-8859-1] (original)
+++ branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/mft.c [iso-8859-1] Sun Jun 12 04:02:52 2016
@@ -520,17 +520,6 @@
}
else
DataRunStartLCN = -1;
-
- if (*DataRun == 0)
- {
- if (Length == 0)
- return STATUS_SUCCESS;
-
- // This code shouldn't execute, because we should have extended the allocation size
- // or failed the request by now. It's just a sanity check.
- DPRINT1("Encountered EOF before expected!\n");
- return STATUS_END_OF_FILE;
- }
}
// Do we have more data to write?
@@ -559,7 +548,7 @@
Length -= WriteLength;
SourceBuffer += WriteLength;
- RealLengthWritten += WriteLength;
+ *RealLengthWritten += WriteLength;
// We finished this request, but there's still data in this data run.
if (Length == 0 && WriteLength != DataRunLength * Vcb->NtfsInfo.BytesPerCluster)
Author: mjansen
Date: Fri Jun 10 20:57:26 2016
New Revision: 71609
URL: http://svn.reactos.org/svn/reactos?rev=71609&view=rev
Log:
[WIN32SS] Try to load the module before fetching an icon, instead of failing on a module that is not available in the current process. CORE-10292 #resolve
Modified:
trunk/reactos/win32ss/user/user32/windows/cursoricon.c
Modified: trunk/reactos/win32ss/user/user32/windows/cursoricon.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/window…
==============================================================================
--- trunk/reactos/win32ss/user/user32/windows/cursoricon.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/user32/windows/cursoricon.c [iso-8859-1] Fri Jun 10 20:57:26 2016
@@ -1867,11 +1867,12 @@
TRACE("Got module %wZ, resource %p (%S).\n", &ustrModule,
ustrRsrc.Buffer, IS_INTRESOURCE(ustrRsrc.Buffer) ? L"" : ustrRsrc.Buffer);
- /* Get the module handle */
- if (!GetModuleHandleExW(0, ustrModule.Buffer, &hModule))
- {
- /* This should never happen */
- ERR("Invalid handle? Module='%wZ', error %lu.\n", &ustrModule, GetLastError());
+ /* Get the module handle or load the module */
+ hModule = LoadLibraryExW(ustrModule.Buffer, NULL, LOAD_LIBRARY_AS_IMAGE_RESOURCE | LOAD_LIBRARY_AS_DATAFILE);
+ if (!hModule)
+ {
+ DWORD err = GetLastError();
+ ERR("Unable to load/use module '%wZ' in process %lu, error %lu.\n", &ustrModule, GetCurrentProcessId(), err);
SetLastError(ERROR_INVALID_PARAMETER);
goto leave;
}