Skip to content

Prevent arithmetic overflow of 'i' in master.c:generate

the value of 'i' in generate could overflow when adding 'step' to it in the 'for' loop. Use an unsigned int for 'i' which will give an additional bit and prevent the overflow. The inputs are both less than 2^31 and and the result will be less than 2^32-1.

(cherry picked from commit 5abdee90)

Closes #3191 (closed)

Merge request reports