Re: dlls/icmp/icmp_main.c -- attempt at fixing regression in r1.30 (RESEND)
Gerald Pfeifer wrote:
On Wed, 5 Dec 2007, Alexandre Julliard wrote:
Looks ok, please submit the patch with a proper Changelog entry.
Thanks for looking into this! Here we go! :-)
ChangeLog: Correctly handle underflow in IcmpSendEcho(); bug introduced in rev 1.30. Still using cvs? I guess nobody else can do anything with rev 1.30.
bye michael
Index: dlls/icmp/icmp_main.c =================================================================== RCS file: /home/wine/wine/dlls/icmp/icmp_main.c,v retrieving revision 1.30 diff -u -3 -p -r1.30 icmp_main.c --- dlls/icmp/icmp_main.c 6 Nov 2006 11:51:07 -0000 1.30 +++ dlls/icmp/icmp_main.c 22 Nov 2007 21:28:59 -0000 @@ -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 */
-- Michael Stefaniuc Tel.: +49-711-96437-199 Consulting Communications Engineer Fax.: +49-711-96437-111 -------------------------------------------------------------------- Reg. Adresse: Red Hat GmbH, Hauptstätter Strasse 58, 70178 Stuttgart Handelsregister: Amtsgericht Stuttgart HRB 153243 Geschäftsführer: Brendan Lane, Charlie Peters, Michael Cunningham, Werner Knoblich
participants (1)
-
Michael Stefaniuc