BUG/MINOR: tools: fix statistical_prng_range()'s output range

This function was added by commit 84ebfabf7 ("MINOR: tools: add
statistical_prng_range() to get a random number over a range") but it
contains a bug on the range, since mul32hi() covers the whole input
range, we must pass it range-1. For now it didn't have any impact, but
if used to find an array's index it will cause trouble.

This should be backported to 2.4.

(cherry picked from commit 03f3049df167069f1bf802c18c275524c346513c)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit bf7f10efbde938ac28d552adb8d93704b9d28b5a)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 85e25d7efc8d1564b6d4c35fc07223919def0a16)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
1 file changed