Re: [FFmpeg-devel] [PATCH] tests/checkasm/llauddsp: Avoid UB integer overflow

2024-05-15 Thread Andreas Rheinhardt
Andreas Rheinhardt: > The only multiplicators used in scalarproduct_and_madd_* > are -1, 0 and +1. Yet it is of type int and the checkasm > test uses the complete range of int for it, leading to overflows > that don't happen for actual users. > > Fix this by using a more reasonable range for mul:

[FFmpeg-devel] [PATCH] tests/checkasm/llauddsp: Avoid UB integer overflow

2024-05-12 Thread Andreas Rheinhardt
The only multiplicators used in scalarproduct_and_madd_* are -1, 0 and +1. Yet it is of type int and the checkasm test uses the complete range of int for it, leading to overflows that don't happen for actual users. Fix this by using a more reasonable range for mul: Given that it is used in v1[i]