mirror of https://github.com/OISF/suricata
app-layer-htp, stream-tcp: prevent modulo bias in RandomGetWrap()
RAND_MAX is not guaranteed to be a divisor of ULONG_MAX, so take the necessary precautions to get unbiased random numbers. Although the bias might be negligible, it's not advisable to rely on it.pull/3183/head
parent
2e4305f504
commit
18f64e0d21
Loading…
Reference in New Issue