From owner-p4-projects Wed Dec 4 20:18:26 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7D9F037B404; Wed, 4 Dec 2002 20:18:24 -0800 (PST) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 27A8237B401 for ; Wed, 4 Dec 2002 20:18:24 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D89B643EB2 for ; Wed, 4 Dec 2002 20:18:23 -0800 (PST) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id gB54E5mV050350 for ; Wed, 4 Dec 2002 20:14:05 -0800 (PST) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id gB54E5ur050347 for perforce@freebsd.org; Wed, 4 Dec 2002 20:14:05 -0800 (PST) Date: Wed, 4 Dec 2002 20:14:05 -0800 (PST) Message-Id: <200212050414.gB54E5ur050347@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm Subject: PERFORCE change 21952 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG http://perforce.freebsd.org/chv.cgi?CH=21952 Change 21952 by peter@peter_itanic2 on 2002/12/04 20:13:29 OK, I'm going to shoot myself. We do need an upper limit on time_t that we send in here or we cannot represent it in the internal struct tm for comparisons. This does need to be fixed better. Affected files ... .. //depot/projects/ia64/lib/libc/stdtime/localtime.c#10 edit Differences ... ==== //depot/projects/ia64/lib/libc/stdtime/localtime.c#10 (text+ko) ==== @@ -1476,6 +1476,11 @@ */ bits = TYPE_BIT(time_t) - 1; /* + ** If we have more than this, we will overflow tm_year in tmcomp(). + */ + if (bits > 56) + bits = 56; + /* ** If time_t is signed, then 0 is just above the median, ** assuming two's complement arithmetic. ** If time_t is unsigned, then (1 << bits) is just above the median. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message