зеркало из https://github.com/github/ruby.git
Fix the previous commit.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
319dc9f6c6
Коммит
685597fdc1
|
@ -1,4 +1,4 @@
|
|||
Thu Aug 8 21:10:05 2013 Tanaka Akira <akr@fsij.org>
|
||||
Thu Aug 8 21:32:22 2013 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* time.c (time_overflow_p): Avoid signed integer overflow.
|
||||
|
||||
|
|
2
time.c
2
time.c
|
@ -2231,7 +2231,7 @@ time_overflow_p(time_t *secp, long *nsecp)
|
|||
}
|
||||
if (nsec < 0) { /* nsec negative overflow */
|
||||
sec2 = NDIV(nsec,1000000000); /* negative div */
|
||||
if (sec < TIMET_MAX - sec2) {
|
||||
if (sec < TIMET_MIN - sec2) {
|
||||
rb_raise(rb_eRangeError, "out of Time range");
|
||||
}
|
||||
nsec = NMOD(nsec,1000000000); /* negative mod */
|
||||
|
|
Загрузка…
Ссылка в новой задаче