🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.b
Article #5126

rn 4.3 patch #38

#5126
From: Larry Wall
Date: Mon, 17 Nov 1986 20:15
75 lines
2556 bytes
System: rn version 4.3
Patch #: 38
Priority: depends
Subject: Rn dumps core on 16 bit USG machines
From: mn-at1!alan (Alan Klietz)

Description:
	Rn dumps core on opening a directory.  This only happens on machines
	that make use of the ndir.c that comes with rn.
	
Repeat by:
	Run rn on a 16 bit System V machine (e.g. Xenix
	or Microport UNIX/V).  Watch it dump core.

Fix:
	The opendir() routine fails to declare malloc() as
	(char *).  This results in a 16 bit value being passed
	to the directory routine when a 32 bit value is really
	required.

	The fix is to declare malloc().

	From rn, say "| patch -d DIR", where DIR is your rn source directory.
	Outside of rn, say "cd DIR; patch <thisarticle".  If you don't have
	the patch program, apply the following by hand, or get patch.

	If patch indicates that patchlevel is the wrong version, you may need
	to apply one or more previous patches, or the patch may already
	have been applied.  See the patchlevel file to find out what has or
	has not been applied.  In any event, don't continue with the patch.

	[Note, I cannot test this patch because rn is being rewritten--law]

	If you are missing previous patches they can be obtained from me:

	Larry Wall
	{allegra,burdvax,cbosgd,hplabs,ihnp4,sdcsvax}!sdcrdcf!lwall

	If you send a mail message of the following form it will greatly speed
	processing:

	Subject: Command
	@SH mailpatch PATH rn 4.3 LIST

	where PATH is a return path FROM ME TO YOU in bang notation, and LIST
	is a list of one or more patches you need, separated by spaces, commas
	and/or hyphens.

Index: patchlevel
Prereq: 37
1c1
< Patch #: 37
---
> Patch #: 38

Index: ndir.c
*** ndir.c.orig	Sun Nov  9 21:04:03 1986
--- ndir.c	Sun Nov  9 21:04:09 1986
***************
*** 34,39
  {
  	register DIR *dirp;
  	register int fd;
  
  	if ((fd = open(name, 0)) == -1)
  		return NULL;

--- 34,40 -----
  {
  	register DIR *dirp;
  	register int fd;
+ 	char *malloc();
  
  	if ((fd = open(name, 0)) == -1)
  		return NULL;
Technical Details
Message-ID: <3436@sdcrdcf.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!rutgers!sri-unix!hplabs!sdcrdcf!lwall

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!rutgers!sri-unix!hplabs!sdcrdcf!lwall
From: lwall@sdcrdcf.UUCP (Larry Wall)
Newsgroups: news.software.b,net.sources.bugs
Subject: rn 4.3 patch #38
Message-ID: <3436@sdcrdcf.UUCP>
Date: Mon, 17-Nov-86 15:15:34 EST
Article-I.D.: sdcrdcf.3436
Posted: Mon Nov 17 15:15:34 1986
Date-Received: Mon, 17-Nov-86 22:35:31 EST
Organization: System Development Corporation R&D, Santa Monica
Lines: 75