Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Step:15-SP4
pacemaker.34782
0001-Fix-iso8601-prevent-sec-overrun-before-add...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-Fix-iso8601-prevent-sec-overrun-before-adding-up-as-.patch of Package pacemaker.34782
From 7e98de78c289402380dee67d543eee133cd1e699 Mon Sep 17 00:00:00 2001 From: Klaus Wenninger <klaus.wenninger@aon.at> Date: Tue, 16 Feb 2021 10:16:44 +0100 Subject: [PATCH] Fix: iso8601: prevent sec overrun before adding up as long long --- lib/common/iso8601.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/common/iso8601.c b/lib/common/iso8601.c index c5101d7fc..117d33833 100644 --- a/lib/common/iso8601.c +++ b/lib/common/iso8601.c @@ -321,7 +321,7 @@ crm_time_get_seconds(crm_time_t * dt) } for (lpc = 1; lpc < utc->years; lpc++) { - int dmax = year_days(lpc); + long long dmax = year_days(lpc); in_seconds += DAY_SECONDS * dmax; } @@ -334,11 +334,11 @@ crm_time_get_seconds(crm_time_t * dt) * for anyone that tries to use a month in this way. */ if (utc->months > 0) { - in_seconds += DAY_SECONDS * 30 * utc->months; + in_seconds += DAY_SECONDS * 30 * (long long) (utc->months); } if (utc->days > 0) { - in_seconds += DAY_SECONDS * (utc->days - 1); + in_seconds += DAY_SECONDS * (long long) (utc->days - 1); } in_seconds += utc->seconds; -- 2.26.2
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor