mirror of
https://github.com/Perl/perl5.git
synced 2026-01-26 08:38:23 +00:00
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.
This commit is contained in:
parent
d002288880
commit
d9affba121
Loading…
x
Reference in New Issue
Block a user