ICU-2966 range-check previous month

X-SVN-Rev: 12757
This commit is contained in:
Alan Liu 2003-08-04 23:13:43 +00:00
parent 437c9d85d7
commit fbf9a44f50

View file

@ -460,7 +460,9 @@ SimpleTimeZone::getOffset(uint8_t era, int32_t year, int32_t month, int32_t day,
|| millis < 0
|| millis >= U_MILLIS_PER_DAY
|| monthLength < 28
|| monthLength > 31) {
|| monthLength > 31
|| prevMonthLength < 28
|| prevMonthLength > 31) {
status = U_ILLEGAL_ARGUMENT_ERROR;
return -1;
}