summaryrefslogtreecommitdiff
path: root/src/shared/logs-show.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-02-02 20:36:18 -0500
committerGitHub <noreply@github.com>2017-02-02 20:36:18 -0500
commit2341216ad744b7aee83e54c82c2fb6413258fcc8 (patch)
tree482604dd5106d24b470dd2c8012ee77c3a43992f /src/shared/logs-show.c
parentf1669917f583279ac7348283206612462b178597 (diff)
parented737400c207b6b909cd6168713e528771693923 (diff)
Merge pull request #5212 from poettering/time-range
time handling fixes
Diffstat (limited to 'src/shared/logs-show.c')
-rw-r--r--src/shared/logs-show.c5
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;