Skip to content

Commit b6b4117

Browse files
committed
fix for sizeof pointed out by Ed Buddington
1 parent 3e248ed commit b6b4117

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/interfaces/libpq/fe-connect.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.33 1997/05/09 03:28:49 scrappy Exp $
10+
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.34 1997/05/13 01:46:00 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -720,7 +720,7 @@ startup2PacketBuf(StartupInfo* s, PacketBuf* res)
720720
tmp += sizeof(s->options);
721721
strncpy(tmp, s->execFile, sizeof(s->execFile));
722722
tmp += sizeof(s->execFile);
723-
strncpy(tmp, s->tty, sizeof(s->execFile));
723+
strncpy(tmp, s->tty, sizeof(s->tty));
724724
}
725725

726726
/* ----------------

0 commit comments

Comments
 (0)