Commit d7c5601
committed
don't quite fix potential I32 overflow in S_run_user_filter
Coverity says:
CID 584101: Integer handling issues (INTEGER_OVERFLOW)
Expression "status", where "Perl_SvIV(my_perl, out)" is known to be equal to 0, overflows the type of "status", which is type "int".
What it really means is that doing 'int status = SvIV(...)' may overflow
(since IV can be (and on 64-bit systems usually is) wider than int).
This patch doesn't fix that issue. However, it avoids yet another type
in the mix: S_run_user_filter() is declared as returning I32, not int,
and elsewhere assigns filter_read(...) (also an I32) to 'result'.
So instead of worrying about (overflowing) conversions between IV, int,
and I32, make 'result' an I32 and only worry about (overflowing)
conversions between IV and I32.1 parent 137855d commit d7c5601
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6852 | 6852 | | |
6853 | 6853 | | |
6854 | 6854 | | |
6855 | | - | |
| 6855 | + | |
6856 | 6856 | | |
6857 | 6857 | | |
6858 | 6858 | | |
| |||
0 commit comments