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
This Usenet Oldnews Archive article may be copied and distributed freely, provided:

1. There is no money collected for the text(s) of the articles.
2. The following notice remains appended to each copy:

The Usenet Oldnews Archive: Compilation Copyright© 1981, 1996
Bruce Jones, Henry Spencer, David Wiseman.


Goto NEXT article in NET.bugs.2bsd Newsgroup
Return to NET.bugs.2bsd index
Return to the Usenet Oldnews Archive index ----------------------------------------------------------------- gopher://quux.org/ conversion by John Goerzen of http://communication.ucsd.edu/A-News/ This Usenet Oldnews Archive article may be copied and distributed freely, provided: 1. There is no money collected for the text(s) of the articles. 2. The following notice remains appended to each copy: The Usenet Oldnews Archive: Compilation Copyright (C) 1981, 1996 Bruce Jones, Henry Spencer, David Wiseman.