Commit 25301a76 authored by Gerald Pfeifer's avatar Gerald Pfeifer Committed by Alexandre Julliard

icmp: Correctly handle underflow in IcmpSendEcho().

parent 8382eb01
......@@ -433,8 +433,9 @@ DWORD WINAPI IcmpSendEcho(
* Decrease the timeout so that we don't enter an endless loop even
* if we get flooded with ICMP packets that are not for us.
*/
Timeout -= (recv_time - send_time);
if (Timeout < 0) Timeout = 0;
DWORD t = (recv_time - send_time);
if (Timeout > t) Timeout -= t;
else Timeout = 0;
continue;
} else {
/* This is a reply to our packet */
......
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