Skip to content

Commit b47c4dd

Browse files
committed
Buffer-overrun paranoia.
1 parent 55ca02f commit b47c4dd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/include/libpq/pqcomm.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
1010
* Portions Copyright (c) 1994, Regents of the University of California
1111
*
12-
* $Id: pqcomm.h,v 1.64 2002/06/20 20:29:49 momjian Exp $
12+
* $Id: pqcomm.h,v 1.65 2002/08/12 14:35:26 tgl Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
@@ -54,7 +54,7 @@ typedef union SockAddr
5454
/* Configure the UNIX socket location for the well known port. */
5555

5656
#define UNIXSOCK_PATH(sun,port,defpath) \
57-
sprintf((sun).sun_path, "%s/.s.PGSQL.%d", \
57+
snprintf((sun).sun_path, sizeof((sun).sun_path), "%s/.s.PGSQL.%d", \
5858
((defpath) && *(defpath) != '\0') ? (defpath) : \
5959
DEFAULT_PGSOCKET_DIR, \
6060
(port))

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