Repository navigation
Commit d65baa9
Avoid multiplying the whole numerator in _PyTime_FromSecondsObject()
Only the remainder of the division by the denominator is now scaled,
as in _PyTime_ObjectToTimeval() and _PyTime_ObjectToTimespec().
Too large values are rejected before the multiplication.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent 7b8e62b commit d65baa9
1 file changed
Lines changed: 41 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
954 | 954 | | |
955 | 955 | | |
956 | 956 | | |
957 | | - | |
958 | | - | |
959 | | - | |
960 | | - | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
961 | 981 | | |
962 | | - | |
| 982 | + | |
963 | 983 | | |
964 | 984 | | |
965 | | - | |
966 | | - | |
967 | | - | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
968 | 1001 | | |
969 | 1002 | | |
970 | 1003 | | |
| |||
0 commit comments