SysReAllocStringLen nit
Dimitrie O. Paun
dpaun at rogers.com
Tue Nov 25 01:16:43 CST 2003
ChangeLog
SysReAllocStringLen is documented to segfault on NULL pointer.
Index: dlls/oleaut32/oleaut.c
===================================================================
RCS file: /var/cvs/wine/dlls/oleaut32/oleaut.c,v
retrieving revision 1.36
diff -u -r1.36 oleaut.c
--- dlls/oleaut32/oleaut.c 14 Nov 2003 21:01:15 -0000 1.36
+++ dlls/oleaut32/oleaut.c 25 Nov 2003 06:05:49 -0000
@@ -293,12 +293,6 @@
*/
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));
--
Dimi.
More information about the wine-patches
mailing list