From nobody@www.freebsd.org  Sun May 12 13:23:58 2002
Return-Path: <nobody@www.freebsd.org>
Received: from nwww.freebsd.org (www.FreeBSD.org [216.136.204.117])
	by hub.freebsd.org (Postfix) with ESMTP id 4BE1C37B40A
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 12 May 2002 13:23:58 -0700 (PDT)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by nwww.freebsd.org (8.12.2/8.12.2) with ESMTP id g4CKNvhG053289
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 12 May 2002 13:23:57 -0700 (PDT)
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.2/8.12.2/Submit) id g4CKNvBn053288;
	Sun, 12 May 2002 13:23:57 -0700 (PDT)
Message-Id: <200205122023.g4CKNvBn053288@www.freebsd.org>
Date: Sun, 12 May 2002 13:23:57 -0700 (PDT)
From: Pierre-Paul Lavoie <ppl@nbnet.nb.ca>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [PATCH] games/editss segfaults if ~/.xpilotrc is not present
X-Send-Pr-Version: www-1.0

>Number:         38001
>Category:       ports
>Synopsis:       [PATCH] games/editss segfaults if ~/.xpilotrc is not present
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun May 12 13:30:01 PDT 2002
>Closed-Date:    Wed Oct 09 23:41:22 PDT 2002
>Last-Modified:  Wed Oct 09 23:41:22 PDT 2002
>Originator:     Pierre-Paul Lavoie
>Release:        4.5
>Organization:
>Environment:
FreeBSD ip01018008658.nbtel.net 4.5-RELEASE FreeBSD 4.5-RELEASE #1: Mon Mar  4 15:41:39 AST 2002     root@ip01018008658.nbtel.net:/usr/obj/usr/src/sys/BLOODAXIS  i386
>Description:
      Fix some warning about value.h. Make sure that it doesn't attempt to fclose a NULL pointer if ~/.xpilotrc is not present.
>How-To-Repeat:
      run editss without a ~/.xpilotrc
>Fix:
      http://bloodaxis.dyndns.org/~ppl/patch/editss.diff
>Release-Note:
>Audit-Trail:

From: Pierre-Paul Lavoie <ppl@nbnet.nb.ca>
To: freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: ports/38001: [PATCH] games/editss segfaults if ~/.xpilotrc is not present
Date: Sat, 6 Jul 2002 00:07:41 -0300

 Making sure the small patch doesn't become unavailable on the web...
 
 
 diff -ruN editss-2.2-old/actions.c editss-2.2/actions.c
 --- editss-2.2-old/actions.c	Sun May 12 16:50:47 2002
 +++ editss-2.2/actions.c	Sun May 12 16:54:08 2002
 @@ -32,7 +32,7 @@
  
  #include <stdio.h>					/* usual include stuff */
  #include <stdlib.h>
 -#include <values.h>
 +#include <limits.h>
  #include <string.h>
  #include <fcntl.h>
  #include <time.h>
 diff -ruN editss-2.2-old/editss.c editss-2.2/editss.c
 --- editss-2.2-old/editss.c	Sun May 12 16:50:47 2002
 +++ editss-2.2/editss.c	Sat Jul  6 00:01:17 2002
 @@ -28,7 +28,7 @@
  
  #include <stdio.h>
  #include <stdlib.h>
 -#include <values.h>
 +#include <limits.h>
  #include <string.h>
  #include <fcntl.h>
  #include <time.h>
 @@ -509,7 +509,7 @@
  	while (getoneshipdef(a,fin)) {
  		nrships+=1;	
  	}		   
 -	fclose(fin);
 +	if (fin!=NULL) fclose(fin);
  	if (nrships<1) i1=1; else i1=nrships;
  
  	a[0]='\0';
 diff -ruN editss-2.2-old/xstuff.c editss-2.2/xstuff.c
 --- editss-2.2-old/xstuff.c	Sun May 12 16:50:47 2002
 +++ editss-2.2/xstuff.c	Sun May 12 16:53:53 2002
 @@ -28,7 +28,7 @@
  
  #include <stdio.h>
  #include <stdlib.h>
 -#include <values.h>
 +#include <limits.h>
  #include <string.h>
  #include <fcntl.h>
  #include <time.h>
State-Changed-From-To: open->closed 
State-Changed-By: ijliao 
State-Changed-When: Wed Oct 9 23:41:09 PDT 2002 
State-Changed-Why:  
committed, thanks 

http://www.freebsd.org/cgi/query-pr.cgi?pr=38001 
>Unformatted:
