Avoid overflow in format_time_interval, create unit tests
commitf51418aabcc2af47f61a97f818b013ade6e45208
authorteor <teor2345@gmail.com>
Sun, 12 Oct 2014 09:50:10 +0000 (12 20:50 +1100)
committerteor <teor2345@gmail.com>
Sun, 12 Oct 2014 09:50:10 +0000 (12 20:50 +1100)
tree021ee81515e73fd32822a01751ae1f583115d266
parentf94e5f2e5212034cb8b2666716eeaa61e874065b
Avoid overflow in format_time_interval, create unit tests

Fix an instance of integer overflow in format_time_interval() when
taking the absolute value of the supplied signed interval value.
Fixes bug 13393.

Create unit tests for format_time_interval().
changes/bug13393-format-time-interval-overflow-test [new file with mode: 0644]
src/common/util.c
src/test/test_util.c