Skip to content

Commit a0bb3fd

Browse files
remicolletsmalyshev
authored andcommitted
Fixed bug #66060 (Heap buffer over-read in DateInterval)
Conflicts: ext/date/lib/parse_iso_intervals.c
1 parent eca037a commit a0bb3fd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ext/date/lib/parse_iso_intervals.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ static int scan(Scanner *s)
415415
break;
416416
}
417417
ptr++;
418-
} while (*ptr);
418+
} while (!s->errors->error_count && *ptr);
419419
s->have_period = 1;
420420
TIMELIB_DEINIT;
421421
return TIMELIB_PERIOD;

ext/date/lib/parse_iso_intervals.re

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ isoweek = year4 "-"? "W" weekofyear;
383383
break;
384384
}
385385
ptr++;
386-
} while (*ptr);
386+
} while (!s->errors->error_count && *ptr);
387387
s->have_period = 1;
388388
TIMELIB_DEINIT;
389389
return TIMELIB_PERIOD;

0 commit comments

Comments
 (0)