* bug67252:
fix bug #67253: timelib_meridian_with_check out-of-bounds read
Fix bug #67252: convert_uudecode out-of-bounds read
- /* Generated by re2c 0.13.5 on Sat Jan 25 15:48:30 2014 */
-/* Generated by re2c 0.13.5 on Sun May 11 21:06:56 2014 */
++/* Generated by re2c 0.13.5 on Tue May 13 16:47:20 2014 */
#line 1 "ext/date/lib/parse_date.re"
/*
+----------------------------------------------------------------------+
{
timelib_sll retval = 0;
- while (!strchr("AaPp", **ptr)) {
+ while (**ptr && !strchr("AaPp", **ptr)) {
++*ptr;
}
- if(!**ptr) {
- return TIMELIB_UNSET;
- }
++ if(!**ptr) {
++ return TIMELIB_UNSET;
++ }
if (**ptr == 'a' || **ptr == 'A') {
if (h == 12) {
retval = -12;
{
timelib_sll retval = 0;
- while (!strchr("AaPp", **ptr)) {
+ while (**ptr && !strchr("AaPp", **ptr)) {
++*ptr;
}
- if(!**ptr) {
- return TIMELIB_UNSET;
- }
++ if(!**ptr) {
++ return TIMELIB_UNSET;
++ }
if (**ptr == 'a' || **ptr == 'A') {
if (h == 12) {
retval = -12;