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

Commita6017cf

Browse files
committed
Use sizeof() for snprintf() buffer length.
1 parent5b4fa95 commita6017cf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/port/exec.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $PostgreSQL: pgsql/src/port/exec.c,v 1.54 2007/01/29 20:17:40 momjian Exp $
12+
* $PostgreSQL: pgsql/src/port/exec.c,v 1.55 2007/01/29 20:22:35 momjian Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
@@ -590,7 +590,7 @@ pclose_check(FILE *stream)
590590
{
591591
charstr[256];
592592

593-
snprintf(str,256,"%d: %s",WTERMSIG(exitstatus),
593+
snprintf(str,sizeof(str),"%d: %s",WTERMSIG(exitstatus),
594594
WTERMSIG(exitstatus)<NSIG ?
595595
sys_siglist[WTERMSIG(exitstatus)] :"(unknown)");
596596
log_error(_("child process was terminated by signal %s"),str);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp