Fix p_secstodate overflow handling (bug 22463)

Joseph Myers joseph@codesourcery.com
Wed Nov 22 17:26:00 GMT 2017


On Wed, 22 Nov 2017, Paul Eggert wrote:

> On 11/22/2017 08:49 AM, Joseph Myers wrote:
> > -	time = __gmtime_r(&clock, &timebuf);
> > +	if (secs > 0x7fffffff
> > +	    || (time = __gmtime_r (&clock, &timebuf)) == NULL) {
> 
> __gmtime_r cannot return NULL if secs <= 0x7fffffff. As the goal appears to be

That should be true; this check is simply prudence regarding any possible 
unspecified errors for __gmtime_r.

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Libc-alpha mailing list