git: fetch: Fix infinite loop on display progress

John Marino marino at crater.dragonflybsd.org
Thu Nov 1 14:57:02 PDT 2012


commit 3eca42272f995aeaee9d72266e8812fa6860c9da
Author: John Marino <draco at 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



More information about the Commits mailing list