Re: NMAKE fatal error, 32-bit time_t

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In message <c10a4aa5-70ca-b3b0-ba48-bdf5fb17224e@xxxxxxxxxxx> on Wed, 12 Sep 2018 16:24:03 +0100, Matt Caswell <matt@xxxxxxxxxxx> said:

> 
> 
> On 12/09/18 16:23, Thomas J. Hruska wrote:
> > On 9/12/2018 7:03 AM, Viktor Dukhovni wrote:
> >>
> >>
> >>> On Sep 12, 2018, at 9:53 AM, Thomas J. Hruska
> >>> <shinelight@xxxxxxxxxxxxxxxxxxx> wrote:
> >>>
> >>> Casting to time_t appears to correct the issue and the build
> >>> completes successfully:
> >>>
> >>>     const time_t default_time =
> >>> (time_t)CT_POLICY_EVAL_CTX_get_time(ct_policy_ctx) /
> >>>                                 1000;
> >>
> >> Since the CT time value is in "ms" since epoch, you really don't want
> >> to down-convert that to 32 bit *before* the division.  You'll need
> >> some parentheses:
> >>
> >>    https://en.cppreference.com/w/c/language/operator_precedence
> >>
> >> type cast has higher precedence than division, but you need to
> >> divide first, then cast.
> > 
> > Whoops.  Well, being pointed at the "intro to C" documentation is what I
> > get for rushing that.  It's a bit ironic since I'm notorious for
> > wrapping everything in extra parenthesis just to avoid memorizing
> > operator precedence.
> > 
> > Thanks for pointing that out though.
> > 
> 
> Is this new to 1.1.1? Or does it also impact 1.1.0?

The same problematic code line exists in 1.1.0 (line 545).  I cannot
say why we haven't been hit by this before...

-- 
Richard Levitte         levitte@xxxxxxxxxxx
OpenSSL Project         http://www.openssl.org/~levitte/
-- 
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux