[libvirt] [PATCH] keepalive: Guard against integer overflow

John Ferlan jferlan at redhat.com
Wed Feb 20 22:03:23 UTC 2013


On 02/20/2013 03:51 PM, John Ferlan wrote:
> Don't allow interval to be > MAX_INT/1000 in virKeepAliveStart()
> 
> Guard against possible overflow in virKeepAliveTimeout() by setting the 
> timeout to be MAX_INT/1000 since the math following will multiply it by 1000.
> 
> This is a follow-up of sorts from a Coverity change made last month:
> 
> https://www.redhat.com/archives/libvir-list/2013-January/msg02267.html
> 
> where it was noted that the timeout value math needed overflow protection.
> 
> ---
>  src/rpc/virkeepalive.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
pushed with change to error message

Tks,

John




More information about the libvir-list mailing list