diff --git a/src/backend/libpq/pqpacket.c b/src/backend/libpq/pqpacket.c
index c8098f93daa63d2443a958bf2ce6266f75e24c71..21dd26ca1786cf45811a87d7a89bc1fae20fa5ef 100644
--- a/src/backend/libpq/pqpacket.c
+++ b/src/backend/libpq/pqpacket.c
@@ -9,7 +9,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/libpq/Attic/pqpacket.c,v 1.24 2000/01/26 05:56:29 momjian Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/libpq/Attic/pqpacket.c,v 1.25 2000/03/19 22:10:07 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -197,7 +197,7 @@ PacketSendError(Packet *pkt, char *errormsg)
 	fprintf(stderr, "%s\n", errormsg);
 
 	pkt->pkt.em.data[0] = 'E';
-	StrNCpy(&pkt->pkt.em.data[1], errormsg, sizeof(pkt->pkt.em.data) - 2);
+	StrNCpy(&pkt->pkt.em.data[1], errormsg, sizeof(pkt->pkt.em.data) - 1);
 
 	/*
 	 * The NULL i/o callback will cause the connection to be broken when
diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c
index 28a7ae3933d810cff917b4f4bb7bfc5942980e40..7c44dbc7f9b29508b13ccfbb2c35c43baab6ad3e 100644
--- a/src/backend/postmaster/postmaster.c
+++ b/src/backend/postmaster/postmaster.c
@@ -11,7 +11,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.137 2000/03/17 02:36:18 tgl Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.138 2000/03/19 22:10:08 tgl Exp $
  *
  * NOTES
  *
@@ -1146,15 +1146,15 @@ readStartupPacket(void *arg, PacketLen len, void *pkt)
 	 * silently added and a long packet is silently truncated.
 	 */
 
-	StrNCpy(port->database, si->database, sizeof(port->database) - 1);
-	StrNCpy(port->user, si->user, sizeof(port->user) - 1);
-	StrNCpy(port->options, si->options, sizeof(port->options) - 1);
-	StrNCpy(port->tty, si->tty, sizeof(port->tty) - 1);
+	StrNCpy(port->database, si->database, sizeof(port->database));
+	StrNCpy(port->user, si->user, sizeof(port->user));
+	StrNCpy(port->options, si->options, sizeof(port->options));
+	StrNCpy(port->tty, si->tty, sizeof(port->tty));
 
 	/* The database defaults to the user name. */
 
 	if (port->database[0] == '\0')
-		StrNCpy(port->database, si->user, sizeof(port->database) - 1);
+		StrNCpy(port->database, si->user, sizeof(port->database));
 
 	/* Check a user name was given. */