🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Roger Florkowski Fri, 20 Jan 1989 08:21
diff-1.4 bug.
#1458
Author: Roger Florkowski
Date: Fri, 20 Jan 1989 08:21
32 lines
1327 bytes
In diff-1.4, there is a bug when you:

diff filename dirname

where filename is contained in the directory dirname.  The bug
is that compare_files frees the dirname even though it came
from argv[].  This patch checks if should free it first.

*** diff.c~	Fri Oct  7 03:18:42 1988
--- diff.c	Fri Jan 20 02:56:43 1989
***************
*** 476,482 ****
  	}
        else
  	{
! 	  free (inf[dir_arg].name);
  	  inf[dir_arg].name = filename;
  	  if (fstat (inf[dir_arg].desc, &inf[dir_arg].stat) < 0)
  	    pfatal_with_name (inf[dir_arg].name);
--- 476,483 ----
  	}
        else
  	{
! 	  if ( 0 != (dir_arg ? dir1 : dir0))
! 	    free (inf[dir_arg].name);
  	  inf[dir_arg].name = filename;
  	  if (fstat (inf[dir_arg].desc, &inf[dir_arg].stat) < 0)
  	    pfatal_with_name (inf[dir_arg].name);
--
Roger Florkowski				uunet!uvm-gen!banzai!roger
The People's Computer Company			`Revolutionary Programming'
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads