Hour bit fields have 24 bits (0..23, 3 bytes). bit_nclear() however in this case is called to clear bits 0..24! Thus, it overwrites the first bit of the following struct member (dom). This is not problematic for normal use as dom is set after hour as are all other fields.
The last field, dow, uses 8 bits so 9 are cleared. This could be the MIN_STAR bit of flags, but as flags is an int, there is probably a padding byte in between; at least I couldn't trigger it to be unset. So this could probably only cause problems on 8-bit systems.
https://fedorahosted.org/cronie/ticket/11
Signed-off-by: Marcela Mašláňová <mmaslano@redhat.com>
*/
/* clear the bit string, since the default is 'off'.
*/
- bit_nclear(bits, 0, (high - low + 1));
+ bit_nclear(bits, 0, (high - low));
/* process all ranges
*/