]> git.ipfire.org Git - thirdparty/systemd.git/commit
calendarspec: improve overflow handling
authorDouglas Christman <DouglasChristman@gmail.com>
Tue, 20 Dec 2016 21:42:12 +0000 (16:42 -0500)
committerDouglas Christman <DouglasChristman@gmail.com>
Tue, 20 Dec 2016 22:52:55 +0000 (17:52 -0500)
commitc0aebb4b3b38caca64ae190f1d523edf46f03969
tree804df8f381b3ea651a2bb6abb0eb883fa25961a4
parent9f702d00d61a9d7bceeb07eced01427a85193021
calendarspec: improve overflow handling

Check if the parsed seconds value fits in an integer *after*
multiplying by USEC_PER_SEC, otherwise a large value can trigger
modulo by zero during normalization.
src/basic/calendarspec.c
src/test/test-calendarspec.c