Commit 99bf92e3 authored by Dimitrie O. Paun's avatar Dimitrie O. Paun Committed by Alexandre Julliard

SysReAllocStringLen is documented to segfault on NULL pointer.

parent d8aa8535
......@@ -293,12 +293,6 @@ BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len)
*/
int WINAPI SysReAllocStringLen(BSTR* old, const OLECHAR* str, unsigned int len)
{
/*
* Sanity check
*/
if (old==NULL)
return 0;
if (*old!=NULL) {
DWORD newbytelen = len*sizeof(WCHAR);
DWORD *ptr = HeapReAlloc(GetProcessHeap(),0,((DWORD*)*old)-1,newbytelen+sizeof(WCHAR)+sizeof(DWORD));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment