Commit 11e1d23
committed
pp_sleep: fix potential I32 overflow
Coverity says:
CID 584095: Integer handling issues (INTEGER_OVERFLOW)
Expression "duration", where "(IV)Perl_SvIV(my_perl, *sp--)" is known to be equal to 0, overflows the type of "duration", which is type "I32 const".
There are two dodgy type conversions in this function: from IV (POPi) to
I32 (duration), and from I32 (duration) to unsigned int (sleep argument,
by cast). Avoid the one Coverity complains about by making 'duration' an
IV.1 parent 2aadb9c commit 11e1d23
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5123 | 5123 | | |
5124 | 5124 | | |
5125 | 5125 | | |
5126 | | - | |
| 5126 | + | |
5127 | 5127 | | |
5128 | 5128 | | |
5129 | 5129 | | |
| |||
0 commit comments