From: Andrew Bartlett Date: Mon, 7 May 2012 09:21:10 +0000 (+1000) Subject: lib/util: Map 0x7fffffffffffffffLL as 0x7fffffffffffffffLL in time conversion X-Git-Tag: samba-4.0.0alpha21~291 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=470cfb34aea693cdb774b648d51ceccda130f329;p=thirdparty%2Fsamba.git lib/util: Map 0x7fffffffffffffffLL as 0x7fffffffffffffffLL in time conversion TIME_T_MAX is not actually INT64_MAX at the moment, so check both values and set to the magic end-of-time value. Andrew Bartlett Autobuild-User: Andrew Bartlett Autobuild-Date: Tue May 8 06:41:43 CEST 2012 on sn-devel-104 --- diff --git a/lib/util/time.c b/lib/util/time.c index dc3ca68a3d6..d5a429af940 100644 --- a/lib/util/time.c +++ b/lib/util/time.c @@ -148,7 +148,7 @@ _PUBLIC_ void unix_to_nt_time(NTTIME *nt, time_t t) return; } - if (t == TIME_T_MAX) { + if (t == TIME_T_MAX || t == INT64_MAX) { *nt = 0x7fffffffffffffffLL; return; }