diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 1999-05-04 23:39:20 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 1999-05-04 23:39:20 +0000 |
commit | 1afe0b314679520c8d254acebb870f1af23fe645 (patch) | |
tree | 119cfdbde5d45054dcea3be0af3c5efbcbd276e6 /src | |
parent | 84e832a8027354c6c583e837a80fba64bf83298d (diff) | |
download | postgresql-1afe0b314679520c8d254acebb870f1af23fe645.tar.gz postgresql-1afe0b314679520c8d254acebb870f1af23fe645.zip |
Repair incorrectly-figured snprintf length restriction.
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/libpq/pqcomm.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/backend/libpq/pqcomm.c b/src/backend/libpq/pqcomm.c index 7f890569d3b..654b7cefbce 100644 --- a/src/backend/libpq/pqcomm.c +++ b/src/backend/libpq/pqcomm.c @@ -28,7 +28,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: pqcomm.c,v 1.68 1999/04/25 03:19:21 tgl Exp $ + * $Id: pqcomm.c,v 1.69 1999/05/04 23:39:20 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -261,8 +261,10 @@ StreamServerPort(char *hostName, short portName, int *fdP) "\tIs another postmaster already running on that port?\n"); if (family == AF_UNIX) { - snprintf(PQerrormsg + strlen(PQerrormsg), ERROR_MSG_LENGTH, - "\tIf not, remove socket node (%s) and retry.\n", sock_path); + snprintf(PQerrormsg + strlen(PQerrormsg), + ERROR_MSG_LENGTH - strlen(PQerrormsg), + "\tIf not, remove socket node (%s) and retry.\n", + sock_path); } else { |