Changeset 2558


Ignore:
Timestamp:
Jul 17, 2008, 1:17:07 AM (12 years ago)
Author:
Sam Hocevar
Message:
  • zzcat.c: partial fread() reads are undefined; avoid them in zzcat.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • zzuf/trunk/test/zzcat.c

    r2532 r2558  
    102102            fseek(stream, myrand() % len, SEEK_SET);
    103103            for(j = 0; j < 4; j++)
    104                 fread(data + ftell(stream), myrand() % 4096, 1, stream);
     104                fread(data + ftell(stream),
     105                      myrand() % (len - ftell(stream)), 1, stream);
    105106            fseek(stream, myrand() % len, SEEK_SET);
    106107            now = ftell(stream);
Note: See TracChangeset for help on using the changeset viewer.