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

Commitdb94419

Browse files
committed
pgbench: fix segfault with empty sql file
Commit1d0c3b3 introduced a bug that causes pgbench to crash if anempty script file is specified. Fix it by rejecting such files atstartup, which is the historical and intended behavior.Reported-By: Jeff JanesDiscussion:https://www.postgresql.org/message-id/CAMkU=1zxKUbLPOt9hQWFp14pTc=V0cGo2GQBbn2GsK2Pu+8ZfA@mail.gmail.com
1 parentd03130d commitdb94419

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎src/bin/pgbench/pgbench.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2686,7 +2686,8 @@ findBuiltin(const char *name, char **desc)
26862686
staticvoid
26872687
addScript(constchar*name,Command**commands)
26882688
{
2689-
if (commands==NULL)
2689+
if (commands==NULL||
2690+
commands[0]==NULL)
26902691
{
26912692
fprintf(stderr,"empty command list for script \"%s\"\n",name);
26922693
exit(1);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp