diff options
Diffstat (limited to 'src/shared/logs-show.c')
-rw-r--r-- | src/shared/logs-show.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c index 75ea25c8ac..72c43e80cb 100644 --- a/src/shared/logs-show.c +++ b/src/shared/logs-show.c @@ -246,6 +246,11 @@ static int output_timestamp_realtime(FILE *f, sd_journal *j, OutputMode mode, Ou if (r < 0) return log_error_errno(r, "Failed to get realtime timestamp: %m"); + if (x > USEC_TIMESTAMP_FORMATTABLE_MAX) { + log_error("Timestamp cannot be printed"); + return -EINVAL; + } + if (mode == OUTPUT_SHORT_FULL) { const char *k; |