mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 04:13:34 +00:00
SearchPathA()
- Fix calculation of buffer size (fixes Skype crash) Patch by Mikhail Denisenko ([email protected]) See issue #4526 for more details. svn path=/trunk/; revision=41295
This commit is contained in:
@@ -885,7 +885,7 @@ SearchPathA (
|
||||
goto Cleanup;
|
||||
}
|
||||
|
||||
BufferU.MaximumLength = (USHORT)nBufferLength * sizeof(WCHAR);
|
||||
BufferU.MaximumLength = min(nBufferLength * sizeof(WCHAR), USHRT_MAX);
|
||||
BufferU.Buffer = RtlAllocateHeap (RtlGetProcessHeap (),
|
||||
0,
|
||||
BufferU.MaximumLength);
|
||||
@@ -895,7 +895,7 @@ SearchPathA (
|
||||
goto Cleanup;
|
||||
}
|
||||
|
||||
Buffer.MaximumLength = (USHORT)nBufferLength;
|
||||
Buffer.MaximumLength = min(nBufferLength, USHRT_MAX);
|
||||
Buffer.Buffer = lpBuffer;
|
||||
|
||||
RetValue = SearchPathW (NULL == lpPath ? NULL : PathU.Buffer,
|
||||
|
||||
Reference in New Issue
Block a user