Aucbvax.4986 net.2bsd-bugs utzoo!decvax!ucbvax!romine@SRC-Unix Fri Nov 6 06:00:20 1981 Diff Bug From: Raleigh F. Romine There appear to be two bugs in the 2.8BSD diff source. In diffdir.c a cast to unsigned is needed in a malloc call and in diffreg.c a fprintf call needs a stream argument. A diff listing follows: *** diffdir.c Fri Nov 6 08:13:39 1981 --- diffdir.c_ Fri Nov 6 08:04:26 1981 *************** *** 185,191 done(); } fstat(0, &stb); ! dp = (struct direct *)malloc((unsigned)stb.st_size + sizeof (struct direct)); if (dp == 0) { fprintf(stderr, "diff: ran out of memory\n"); done(); --- 185,191 ----- done(); } fstat(0, &stb); ! dp = (struct direct *)malloc(stb.st_size + sizeof (struct direct)); if (dp == 0) { fprintf(stderr, "diff: ran out of memory\n"); done(); *** diffreg.c Fri Nov 6 08:15:34 1981 --- diffreg.c_ Fri Nov 6 08:14:51 1981 *************** *** 167,173 tempfile = mktemp("/tmp/dXXXXX"); f = creat(tempfile,0600); if (f < 0) { ! fprintf(stderr,"diff: "); perror(tempfile); done(); } --- 167,173 ----- tempfile = mktemp("/tmp/dXXXXX"); f = creat(tempfile,0600); if (f < 0) { ! fprintf("diff: "); perror(tempfile); done(); } Raleigh