Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb47c4dd

Browse files
committed
Buffer-overrun paranoia.
1 parent55ca02f commitb47c4dd

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
#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", \
5858
((defpath) && *(defpath) != '\0') ? (defpath) : \
5959
DEFAULT_PGSOCKET_DIR, \
6060
(port))

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp