Skip to content

Commit 1afe0b3

Browse files
committed
Repair incorrectly-figured snprintf length restriction.
1 parent 84e832a commit 1afe0b3

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/backend/libpq/pqcomm.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
*
2929
* Copyright (c) 1994, Regents of the University of California
3030
*
31-
* $Id: pqcomm.c,v 1.68 1999/04/25 03:19:21 tgl Exp $
31+
* $Id: pqcomm.c,v 1.69 1999/05/04 23:39:20 tgl Exp $
3232
*
3333
*-------------------------------------------------------------------------
3434
*/
@@ -261,8 +261,10 @@ StreamServerPort(char *hostName, short portName, int *fdP)
261261
"\tIs another postmaster already running on that port?\n");
262262
if (family == AF_UNIX)
263263
{
264-
snprintf(PQerrormsg + strlen(PQerrormsg), ERROR_MSG_LENGTH,
265-
"\tIf not, remove socket node (%s) and retry.\n", sock_path);
264+
snprintf(PQerrormsg + strlen(PQerrormsg),
265+
ERROR_MSG_LENGTH - strlen(PQerrormsg),
266+
"\tIf not, remove socket node (%s) and retry.\n",
267+
sock_path);
266268
}
267269
else
268270
{

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy