[profile] Prevent potential division by zero
authorMichael Brown <mcb30@ipxe.org>
Sun, 18 Mar 2018 16:36:58 +0000 (18:36 +0200)
committerMichael Brown <mcb30@ipxe.org>
Sun, 18 Mar 2018 16:39:39 +0000 (18:39 +0200)
commitae930644962a886d3845e5d8836c5cf136c82df0
tree71bf03441f6080217b394bcd889ae8df6501bcf0
parentb11ae1d91b32c7d0d52a0fc35a37b5e2f57a0f79
[profile] Prevent potential division by zero

Limit the profile sample count to INT_MAX to avoid both signed
overflow and a potential division by zero when updating the stored
mean value.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/core/profile.c