Message ID | 20170823072123.18769-10-stewart@linux.vnet.ibm.com |
---|---|
State | Accepted |
Headers | show
Return-Path: <skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xcf874JhHz9s3w for <incoming@patchwork.ozlabs.org>; Wed, 23 Aug 2017 17:24:55 +1000 (AEST) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3xcf872JFdzDrHC for <incoming@patchwork.ozlabs.org>; Wed, 23 Aug 2017 17:24:55 +1000 (AEST) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3xcf4S43G8zDql8 for <skiboot@lists.ozlabs.org>; Wed, 23 Aug 2017 17:21:44 +1000 (AEST) Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v7N7K7JV131716 for <skiboot@lists.ozlabs.org>; Wed, 23 Aug 2017 03:21:42 -0400 Received: from e16.ny.us.ibm.com (e16.ny.us.ibm.com [129.33.205.206]) by mx0b-001b2d01.pphosted.com with ESMTP id 2ch542gfy4-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for <skiboot@lists.ozlabs.org>; Wed, 23 Aug 2017 03:21:42 -0400 Received: from localhost by e16.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for <skiboot@lists.ozlabs.org> from <stewart@linux.vnet.ibm.com>; Wed, 23 Aug 2017 03:21:41 -0400 Received: from b01cxnp23032.gho.pok.ibm.com (9.57.198.27) by e16.ny.us.ibm.com (146.89.104.203) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 23 Aug 2017 03:21:39 -0400 Received: from b01ledav004.gho.pok.ibm.com (b01ledav004.gho.pok.ibm.com [9.57.199.109]) by b01cxnp23032.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v7N7LcZH25428018 for <skiboot@lists.ozlabs.org>; Wed, 23 Aug 2017 07:21:38 GMT Received: from localhost (unknown [127.0.0.1]) by IMSVA (Postfix) with SMTP id 60F34112034 for <skiboot@lists.ozlabs.org>; Wed, 23 Aug 2017 03:21:26 -0400 (EDT) X-IMSS-HAND-OFF-DIRECTIVE: 127.0.0.1:10026 Received: from birb.localdomain (unknown [9.83.2.72]) by b01ledav004.gho.pok.ibm.com (Postfix) with SMTP id 2778D112056; Wed, 23 Aug 2017 03:21:15 -0400 (EDT) Received: by birb.localdomain (Postfix, from userid 1000) id 7D027332AFF; Wed, 23 Aug 2017 17:21:24 +1000 (AEST) From: Stewart Smith <stewart@linux.vnet.ibm.com> To: skiboot@lists.ozlabs.org Date: Wed, 23 Aug 2017 17:21:19 +1000 X-Mailer: git-send-email 2.13.5 In-Reply-To: <20170823072123.18769-1-stewart@linux.vnet.ibm.com> References: <20170823072123.18769-1-stewart@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 17082307-0024-0000-0000-000002C3C027 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00007595; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000223; SDB=6.00906371; UDB=6.00454276; IPR=6.00686571; BA=6.00005550; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00016821; XFM=3.00000015; UTC=2017-08-23 07:21:39 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17082307-0025-0000-0000-0000452F6088 Message-Id: <20170823072123.18769-10-stewart@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-08-23_02:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1708230108 Subject: [Skiboot] [PATCH 09/13] mktime: fix off-by-one error calling days_in_month X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Mailing list for skiboot development <skiboot.lists.ozlabs.org> List-Unsubscribe: <https://lists.ozlabs.org/options/skiboot>, <mailto:skiboot-request@lists.ozlabs.org?subject=unsubscribe> List-Archive: <http://lists.ozlabs.org/pipermail/skiboot/> List-Post: <mailto:skiboot@lists.ozlabs.org> List-Help: <mailto:skiboot-request@lists.ozlabs.org?subject=help> List-Subscribe: <https://lists.ozlabs.org/listinfo/skiboot>, <mailto:skiboot-request@lists.ozlabs.org?subject=subscribe> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" <skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org> |
diff --git a/libc/time.c b/libc/time.c index 6a5108691af1..71bbdff647f3 100644 --- a/libc/time.c +++ b/libc/time.c @@ -121,7 +121,7 @@ time_t mktime(struct tm *tm) for (d = days_in_month(month, year); mday > d; d = days_in_month(month, year)) { month++; - if (month > 12) { + if (month > 11) { month = 0; year++; }
From auditing all the mktime() users, there seems to be only a *very* small window around new years day where we could possibly return incorrect data to the OS, and even then, there would have to be FSP reset/reload on FSP machines. I don't *think* there's an opportunity on other machines. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> --- libc/time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)