bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] potential bug


From: Giuseppe Scrivano
Subject: Re: [Bug-wget] potential bug
Date: Sun, 01 Apr 2012 16:26:05 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)

"Xu Zhongxing" <address@hidden> writes:

> I scanned wget with my static analysis tool, and found a potential bug.
> The triggering path is described in attached xml file. Could you please take 
> a look at it.
> The version of wget is 1.13.3

thanks to have reported it.

I have applied the following patch:

=== modified file 'src/gnutls.c'
--- src/gnutls.c        2012-02-23 10:11:49 +0000
+++ src/gnutls.c        2012-04-01 14:24:28 +0000
@@ -160,9 +160,13 @@
 
   do
     {
-      double next_timeout = timeout - ptimer_measure (timer);
-      if (timeout && next_timeout < 0)
-        break;
+      double next_timeout;
+      if (timeout > 0.0)
+       {
+         next_timeout = timeout - ptimer_measure (timer);
+         if (next_timeout < 0)
+           break;
+       }
 
       ret = GNUTLS_E_AGAIN;
       if (timeout == 0 || gnutls_record_check_pending (ctx->session)


Cheers,
Giuseppe



reply via email to

[Prev in Thread] Current Thread [Next in Thread]