2011/5/25 Eric Blake <[email protected]>: > On 05/25/2011 09:06 AM, Matthias Bolte wrote: >> localtime_r expects time_t. >> --- >> v2: add overflow check > > ACK. > >> - localtime_r(&creation, &time_info); >> + creation_time_t = creation_longlong; >> + if (creation_time_t != creation_longlong) { >> + vshError(ctl, "%s", _("time_t overflow")); > > We shouldn't hit this error until 2038, and by then, hopefully more > 32-bit platforms (if any are still running) will have switched to 64-bit > time_t. :) But I agree with keeping this error in the code, since > silent wraparound is always worse than explicit mention of overflow.
I like to be on the safe side :) Thanks, pushed. Matthias -- libvir-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/libvir-list
