DragonFly BSD
DragonFly commits List (threaded) for 2012-11
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

git: fetch: Fix infinite loop on display progress


From: John Marino <marino@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 1 Nov 2012 14:57:02 -0700 (PDT)

commit 3eca42272f995aeaee9d72266e8812fa6860c9da
Author: John Marino <draco@marino.st>
Date:   Thu Nov 1 22:21:52 2012 +0100

    fetch: Fix infinite loop on display progress
    
    As reported by FreeBSD PR bin/153240, fetch can loop forever if it is
    interrupted by a signal at just the right time.
    
    Verbatim from FreeBSD SVN 230307 (18 JAN 2012):
    Fix two issues related to the use of SIGINFO in fetch(1) to display
    progress information.  The first is that fetch_read() (used in the HTTP
    code but not the FTP code) can enter an infinite loop if it has previously
    been interrupted by a signal.  The second is that when it is interrupted,
    fetch_read() will discard any data it may have read up to that point.
    Luckily, both bugs are extremely timing-sensitive and therefore difficult
    
    to trigger.

Summary of changes:
 lib/libfetch/common.c |   57 +++++++++++++++++++++++++++++++++++++++++++++++-
 lib/libfetch/common.h |    8 ++++++-
 lib/libfetch/http.c   |   17 ++++++++++----
 usr.bin/fetch/fetch.c |   20 ++++++++++-------
 4 files changed, 86 insertions(+), 16 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/3eca42272f995aeaee9d72266e8812fa6860c9da


-- 
DragonFly BSD source repository



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