🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.utils.bug
Article #1762

diff 1.12

#1762
From: Jay Plett
Date: Thu, 01 Mar 1990 01:59
40 lines
2036 bytes
I wrote earlier today about "diff -r" dumping core.
I've found one bug.  Don't know if it's the one or not; could
well be (I'm at home right now on a 386i instead of the sensible
machines at work).  I have added an option to diff which selects
message storage (like done by paginate_flag).  I always use the
added option when I use -r.  This path through the code exercises
the bug reported here.  -l would also.

Anyhow, here's the diffs that fix the bug.  This is the wrong
fix; it was the simplest one for the moment.  The correct fix
should be sanity checks in either message() or concat().
message() is sometimes called with two arguments but it requires
three, none of them zero.

*** /tmp/,RCSt1a21875   Wed Feb 28 20:49:48 1990
--- analyze.c   Wed Feb 28 20:43:10 1990
***************
*** 686,694 ****
        && output_style != OUTPUT_RCS)
      {
        if (filevec[0].missing_newline)
!       message ("No newline at end of file %s\n", filevec[0].name);
        if (filevec[1].missing_newline)
!       message ("No newline at end of file %s\n", filevec[1].name);
      }
  
    /* Allocate vectors for the results of comparison:
--- 686,694 ----
        && output_style != OUTPUT_RCS)
      {
        if (filevec[0].missing_newline)
!       message ("No newline at end of file %s\n", filevec[0].name, "");
        if (filevec[1].missing_newline)
!       message ("No newline at end of file %s\n", filevec[1].name, "");
      }
  
    /* Allocate vectors for the results of comparison:


	...jay
Technical Details
Message-ID: <9003010159.AA21886@silence.princeton.nj.us>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!shelby!apple!brutus.cs.uiuc.edu!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!silence.princeton.nj.us!jay

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!shelby!apple!brutus.cs.uiuc.edu!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!silence.princeton.nj.us!jay
From: jay@silence.princeton.nj.us (Jay Plett)
Newsgroups: gnu.utils.bug
Subject: diff 1.12
Message-ID: <9003010159.AA21886@silence.princeton.nj.us>
Date: 1 Mar 90 01:59:15 GMT
Sender: daemon@tut.cis.ohio-state.edu
Reply-To: jay@princeton.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 40