3 ms·
Well, the problem is that it is casting (t + DAY/2) to a long before it divides by DAY, not after. The whole expression ((t + DAY/2) / DAY) will not overflow 3
by nebulous1 4y ago
Well, the problem is that it is casting (t + DAY/2) to a long before it divides by DAY, not after. The whole expression ((t + DAY/2) / DAY) will not overflow 32 bits in any reasonable timeframe, but (t + DAY / 2) will.
- Arnavion 4y agohttps://github.com/shadow-maint/shadow/commit/815ffb7d3e0a8e1d78886dded65a5c6afd22c94e#diff-9ade509d0a1eeb8cd0b2638ddf8ddb2bd65a8dd3a901c829fcac29c12cd42588R81 https://github.com/shadow-maint/shadow/commit/815ffb7d3e0a8e... Amusing that it was broken by an attempt to make it clearer.