|
9 | 9 | * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
|
10 | 10 | * Portions Copyright (c) 1994, Regents of the University of California
|
11 | 11 | *
|
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 $ |
13 | 13 | *
|
14 | 14 | *-------------------------------------------------------------------------
|
15 | 15 | */
|
@@ -54,7 +54,7 @@ typedef union SockAddr
|
54 | 54 | /* Configure the UNIX socket location for the well known port. */
|
55 | 55 |
|
56 | 56 | #defineUNIXSOCK_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", \ |
58 | 58 | ((defpath) && *(defpath) != '\0') ? (defpath) : \
|
59 | 59 | DEFAULT_PGSOCKET_DIR, \
|
60 | 60 | (port))
|
|