FIXED: bugs in src/diff/diff{dir,reg}.c

utzoo!decvax!duke!chico!harpo!cbosg!ihnss!ucbvax!dist2 utzoo!decvax!duke!chico!harpo!cbosg!ihnss!ucbvax!dist2
Sun Dec 6 02:56:52 AEST 1981


	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.

Quite right.  The necessary changes (as described previously) are:

	diff src/diff/diffdir.c.old src/diff/diffdir.c
	188c188
	< 	dp = (struct direct *)malloc(stb.st_size + sizeof (struct direct));
	---
	> 	dp = (struct direct *)malloc((unsigned)stb.st_size + sizeof (struct direct));

	diff src/diff/diffreg.c.old src/diff/diffreg.c
	170c170
	< 		fprintf("diff: ");
	---
	> 		fprintf(stderr, "diff: ");

These changes are necessary on tapes written before 12/5/81.  The latter
bug (in diffreg) exists in 4.1BSD as well.

			Carl



More information about the Comp.bugs.2bsd mailing list