Prevent integer overflow of months in exsltDateFormatDuration()
requested to merge ddkilzer/libxslt:ddkilzer/oss-fuzz-exsltDateFormatDuration-integer-overflow into master
- libexslt/date.c: (exsltDateFormatDuration):
- Change
months
to 'unsigned long' type, and avoid negating LONG_MIN by assigning the value ofLONG_MAX + 1UL
instead. - Casting
months
to 'long' is okay since its value will be in the range [0-11] later.
Found by OSS-Fuzz #56488.