diff --git a/contrib/pg_xlogdump/compat.c b/contrib/pg_xlogdump/compat.c
index 6ca7012fd9..3f68db7fdf 100644
--- a/contrib/pg_xlogdump/compat.c
+++ b/contrib/pg_xlogdump/compat.c
@@ -64,9 +64,10 @@ timestamptz_to_str(TimestampTz dt)
 	strftime(zone, sizeof(zone), "%Z", ltime);
 
 #ifdef HAVE_INT64_TIMESTAMP
-	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);
 #else
-	sprintf(buf, "%s.%.6f %s", ts, fabs(dt - floor(dt)), zone);
+	snprintf(buf, sizeof(buf), "%s.%.6f %s", ts, fabs(dt - floor(dt)), zone);
 #endif
 
 	return buf;
diff --git a/src/backend/catalog/storage.c b/src/backend/catalog/storage.c
index 0fc48dc542..c183800c63 100644
--- a/src/backend/catalog/storage.c
+++ b/src/backend/catalog/storage.c
@@ -64,7 +64,7 @@ typedef struct PendingRelDelete
 
 /*
  * This might look silly, but this is intended to unify the back-patched code
- * with other versions.
+ * against the master branch.
  */
 typedef struct pendingSync
 {
