summaryrefslogtreecommitdiff
path: root/ext/date/lib/parse_date.re
diff options
context:
space:
mode:
Diffstat (limited to 'ext/date/lib/parse_date.re')
-rw-r--r--ext/date/lib/parse_date.re4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/date/lib/parse_date.re b/ext/date/lib/parse_date.re
index 5b923d4bc4..2a0687cbaa 100644
--- a/ext/date/lib/parse_date.re
+++ b/ext/date/lib/parse_date.re
@@ -2131,6 +2131,10 @@ timelib_time *timelib_parse_from_format(char *format, char *string, int len, tim
break;
case '\\': /* escaped char */
+ if(!fptr[1]) {
+ add_pbf_error(s, "Escaped character expected", string, begin);
+ break;
+ }
fptr++;
if (*ptr == *fptr) {
++ptr;