Author: mjansen
Date: Fri Sep 2 21:47:05 2016
New Revision: 72538
URL:
http://svn.reactos.org/svn/reactos?rev=72538&view=rev
Log:
[ICMP] Fix IcmpCloseHandle crashing on NULL handle. Patch by Tim Crawford. CORE-10707
#resolve #comment Thanks!
Modified:
trunk/reactos/dll/win32/iphlpapi/icmp.c
Modified: trunk/reactos/dll/win32/iphlpapi/icmp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/iphlpapi/icmp.c?…
==============================================================================
--- trunk/reactos/dll/win32/iphlpapi/icmp.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/iphlpapi/icmp.c [iso-8859-1] Fri Sep 2 21:47:05 2016
@@ -222,7 +222,8 @@
BOOL WINAPI IcmpCloseHandle(HANDLE IcmpHandle)
{
icmp_t* icp=(icmp_t*)IcmpHandle;
- if (IcmpHandle==INVALID_HANDLE_VALUE) {
+ // REACTOS: Added a check for NULL handle, CORE-10707
+ if (IcmpHandle==INVALID_HANDLE_VALUE || IcmpHandle==NULL) {
/* FIXME: in fact win98 seems to ignore the handle value !!! */
SetLastError(ERROR_INVALID_HANDLE);
return FALSE;