Ignore:
Timestamp:
Jul 6, 2007, 3:40:55 PM (16 years ago)
Author:
Sam Hocevar
Message:
  • Added -p flag to cherry pick file descriptors that get fuzzed.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • zzuf/trunk/src/lib-stream.c

    r1730 r1791  
    176176        LOADSYM(fn); \
    177177        fd = fileno(stream); \
    178         if(!_zz_ready || !_zz_iswatched(fd)) \
     178        if(!_zz_ready || !_zz_iswatched(fd) || !_zz_isactive(fd)) \
    179179            return ORIG(fn)(stream, offset, whence); \
    180180        _zz_lock(fd); \
     
    204204    LOADSYM(rewind);
    205205    fd = fileno(stream);
    206     if(!_zz_ready || !_zz_iswatched(fd))
     206    if(!_zz_ready || !_zz_iswatched(fd) || !_zz_isactive(fd))
    207207    {
    208208        ORIG(rewind)(stream);
     
    234234    LOADSYM(fread);
    235235    fd = fileno(stream);
    236     if(!_zz_ready || !_zz_iswatched(fd))
     236    if(!_zz_ready || !_zz_iswatched(fd) || !_zz_isactive(fd))
    237237        return ORIG(fread)(ptr, size, nmemb, stream);
    238238
     
    295295        LOADSYM(fn); \
    296296        fd = fileno(stream); \
    297         if(!_zz_ready || !_zz_iswatched(fd)) \
     297        if(!_zz_ready || !_zz_iswatched(fd) || !_zz_isactive(fd)) \
    298298            return ORIG(fn)(stream); \
    299299        _zz_lock(fd); \
     
    333333    LOADSYM(fgetc);
    334334    fd = fileno(stream);
    335     if(!_zz_ready || !_zz_iswatched(fd))
     335    if(!_zz_ready || !_zz_iswatched(fd) || !_zz_isactive(fd))
    336336        return ORIG(fgets)(s, size, stream);
    337337
     
    386386    LOADSYM(ungetc);
    387387    fd = fileno(stream);
    388     if(!_zz_ready || !_zz_iswatched(fd))
     388    if(!_zz_ready || !_zz_iswatched(fd) || !_zz_isactive(fd))
    389389        return ORIG(ungetc)(c, stream);
    390390
     
    440440        LOADSYM(fgetc); \
    441441        fd = fileno(stream); \
    442         if(!_zz_ready || !_zz_iswatched(fd)) \
     442        if(!_zz_ready || !_zz_iswatched(fd) || !_zz_isactive(fd)) \
    443443            return ORIG(getdelim)(lineptr, n, delim, stream); \
    444444        line = *lineptr; \
     
    522522    LOADSYM(fgetc);
    523523    fd = fileno(stream);
    524     if(!_zz_ready || !_zz_iswatched(fd))
     524    if(!_zz_ready || !_zz_iswatched(fd) || !_zz_isactive(fd))
    525525        return ORIG(fgetln)(stream, len);
    526526
     
    571571    LOADSYM(__srefill);
    572572    fd = fileno(fp);
    573     if(!_zz_ready || !_zz_iswatched(fd))
     573    if(!_zz_ready || !_zz_iswatched(fd) || !_zz_isactive(fd))
    574574        return ORIG(__srefill)(fp);
    575575
Note: See TracChangeset for help on using the changeset viewer.