From james@jraynard.demon.co.uk Sat Sep 11 03:01:52 1999
Return-Path: <james@jraynard.demon.co.uk>
Received: from finch-post-10.mail.demon.net (finch-post-10.mail.demon.net [194.217.242.38])
	by hub.freebsd.org (Postfix) with ESMTP id 6F7C214E7F
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 11 Sep 1999 03:01:47 -0700 (PDT)
	(envelope-from james@jraynard.demon.co.uk)
Received: from jraynard.demon.co.uk ([158.152.42.77])
	by finch-post-10.mail.demon.net with esmtp (Exim 2.12 #1)
	id 11PjyZ-0007CC-0A
	for FreeBSD-gnats-submit@freebsd.org; Sat, 11 Sep 1999 10:01:44 +0000
Received: (from james@localhost)
	by jraynard.demon.co.uk (8.9.3/8.9.3) id LAA02311;
	Sat, 11 Sep 1999 11:00:57 +0100 (BST)
	(envelope-from james)
Message-Id: <199909111000.LAA02311@jraynard.demon.co.uk>
Date: Sat, 11 Sep 1999 11:00:57 +0100 (BST)
From: James Raynard <james@jraynard.demon.co.uk>
Reply-To: james@jraynard.demon.co.uk
To: FreeBSD-gnats-submit@freebsd.org
Subject: Y2K patch for slurp port
X-Send-Pr-Version: 3.2

>Number:         13694
>Category:       ports
>Synopsis:       Y2K patch for slurp port
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Sep 11 03:10:01 PDT 1999
>Closed-Date:    Wed Oct 27 02:06:54 PDT 1999
>Last-Modified:  Wed Oct 27 02:07:03 PDT 1999
>Originator:     James Raynard
>Release:        FreeBSD 4.0-CURRENT i386
>Organization:
>Environment:
>Description:

	Patch below should be applied to avoid buffer overflow when
	tm_year >= 100.

>How-To-Repeat:
>Fix:
	
--- hostfiles.c.orig	Sat Sep 11 10:40:33 1999
+++ hostfiles.c	Sat Sep 11 10:42:36 1999
@@ -166,7 +166,7 @@
 	else
 		{
 		tmtime = gmtime (&nexttime);
-		ndate = (tmtime -> tm_year * 10000) +
+		ndate = (tmtime -> tm_year%100 * 10000) +
 			   ((tmtime -> tm_mon + 1) * 100) +
 				 tmtime -> tm_mday;
 		ntime = (tmtime -> tm_hour * 10000) +

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: mharo 
State-Changed-When: Wed Oct 27 02:06:54 PDT 1999 
State-Changed-Why:  
Committed, thanks 
>Unformatted:
 
