diff --git a/src/lnav_util.cc b/src/lnav_util.cc index e636d664..68b27cc2 100644 --- a/src/lnav_util.cc +++ b/src/lnav_util.cc @@ -513,7 +513,9 @@ const char *date_time_scanner::scan(const char *time_dest, this->dts_fmt_lock)) { *tm_out = this->dts_base_tm; tm_out->et_flags = 0; - if (time_dest[0] == '+') { + if (time_len > 1 && + time_dest[0] == '+' && + isdigit(time_dest[1])) { char time_cp[time_len + 1]; int gmt_int, off;