Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP7:Update
fonttosfnt
0015-Fix-incorrect-error-handling-in-macTime.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0015-Fix-incorrect-error-handling-in-macTime.patch of Package fonttosfnt
From 51e8117654fb092ae5412d7aa184bfc6b498c954 Mon Sep 17 00:00:00 2001 From: rnhmjoj <rnhmjoj@inventati.org> Date: Fri, 7 Feb 2020 17:46:54 +0100 Subject: [PATCH] Fix incorrect error handling in macTime() mktime() and time() return (time_t -1) to signal an error. Checking for negative values will incorrectly assume an error happened for any calendar date before the unix epoch. --- util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util.c b/util.c index bcbfa2f..4482c9a 100644 --- a/util.c +++ b/util.c @@ -213,10 +213,10 @@ macTime(int *hi, unsigned *lo) tm.tm_isdst = -1; macEpoch = mktime_gmt(&tm); - if(macEpoch < 0) return -1; + if(macEpoch == -1) return -1; current = time(NULL); - if(current < 0) + if(current == -1) return -1; if(current < macEpoch) { -- GitLab
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