diff options
-rw-r--r-- | src/bin/pg_waldump/compat.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bin/pg_waldump/compat.c b/src/bin/pg_waldump/compat.c index 6ff9eb7e77b..6d73f557d30 100644 --- a/src/bin/pg_waldump/compat.c +++ b/src/bin/pg_waldump/compat.c @@ -58,7 +58,8 @@ timestamptz_to_str(TimestampTz dt) strftime(ts, sizeof(ts), "%Y-%m-%d %H:%M:%S", ltime); strftime(zone, sizeof(zone), "%Z", ltime); - sprintf(buf, "%s.%06d %s", ts, (int) (dt % USECS_PER_SEC), zone); + snprintf(buf, sizeof(buf), "%s.%06d %s", + ts, (int) (dt % USECS_PER_SEC), zone); return buf; } |