Commit dd431b3
authored
PyLong_FromString(): fix Coverity CID 1424951 (#4738)
Explicitly cast digits (Py_ssize_t) to double to fix the following
false-alarm warning from Coverity:
"fsize_z = digits * log_base_BASE[base] + 1;"
CID 1424951: Incorrect expression (UNINTENDED_INTEGER_DIVISION)
Dividing integer expressions "9223372036854775783UL" and "4UL", and
then converting the integer quotient to type "double". Any remainder,
or fractional part of the quotient, is ignored.1 parent a0374dd commit dd431b3
1 file changed
Lines changed: 2 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2267 | 2267 | | |
2268 | 2268 | | |
2269 | 2269 | | |
2270 | | - | |
2271 | 2270 | | |
2272 | 2271 | | |
2273 | 2272 | | |
| |||
2331 | 2330 | | |
2332 | 2331 | | |
2333 | 2332 | | |
2334 | | - | |
2335 | | - | |
| 2333 | + | |
| 2334 | + | |
2336 | 2335 | | |
2337 | 2336 | | |
2338 | 2337 | | |
| |||
0 commit comments