Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!samsung!munnari.oz.au!bruce!cechew From: cechew@bruce.cs.monash.OZ.AU (Earl Chew) Newsgroups: comp.os.minix Subject: Patch for estdio 2.1 Summary: fread() bug in estdio 2.1 Keywords: estdio Message-ID: <3481@bruce.cs.monash.OZ.AU> Date: 18 Dec 90 01:53:08 GMT Organization: Monash Uni. Computer Science, Australia Lines: 47 This is a high priority bug fix for estdio 2.1 (which is why I am posting it rather than waiting for 2.2 [probably be after Minix 1.6.x]). The bug is most visible when using uncompress (or compress -d) on files of certain sizes (not all sizes will flush out the bug). Only those programs using fread() are affected by this bug (and only sometimes depending on the size of the request and the contents of the buffer). Programs that don't use fread() are unaffected. Enclosed are two copies of the patch. One in plaintext and one uuencoded. Please apply this patch. Earl ------------------------------------------------------------------------------- *** /tmp/stdio/fread.c Tue Oct 30 16:33:23 1990 --- fread.c Tue Dec 18 12:29:40 1990 *************** *** 66,71 **** --- 66,72 ---- MEMCPY(p, q, (size_t) readsize); p += readsize; q += readsize; + readsize = 0; } else { do ------------------------------------------------------------------------------- table !"#$%&'()*+,-./0123456789:;<=>? @ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_ begin 644 fread.cd M*BHJ("]T;7 OF5?="D@F4I.PH@( EP("L](')E861Sw M:7IE.PH@( EQ("L](')E861S:7IE.PHK( ER96%DPH@( ED;PIRu t end ------------------------------------------------------------------------------- -- Earl Chew, Dept of Computer Science, Monash University, Australia 3168 EMAIL: cechew@bruce.cs.monash.edu.au PHONE: 03 5655447 FAX: 03 5655146 ----------------------------------------------------------------------