Author: pschweitzer Date: Fri May 16 11:13:04 2008 New Revision: 33540
URL: http://svn.reactos.org/svn/reactos?rev=33540&view=rev Log: Check if memory was goodly allocated and zero it before use
Modified: trunk/rosapps/downloader/download.c
Modified: trunk/rosapps/downloader/download.c URL: http://svn.reactos.org/svn/reactos/trunk/rosapps/downloader/download.c?rev=3... ============================================================================== --- trunk/rosapps/downloader/download.c [iso-8859-1] (original) +++ trunk/rosapps/downloader/download.c [iso-8859-1] Fri May 16 11:13:04 2008 @@ -207,6 +207,10 @@ IBindStatusCallbackImpl *This;
This = HeapAlloc(GetProcessHeap(), 0, sizeof(IBindStatusCallbackImpl)); + if (!This) + return NULL; + + ZeroMemory(This, sizeof(IBindStatusCallbackImpl)); This->vtbl = &dlVtbl; This->ref = 1; This->hDialog = Dlg;