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

Commitbd905a0

Browse files
committed
Fix possible NULL dereference in ExecAlterObjectDependsStmt
I used the wrong variable here. Doesn't make a difference today becausethe only plausible caller passes a non-NULL variable, but someday itwill be wrong, and even today's correctness is subtle: the caller thatdoes pass a NULL is never invoked because of object type constraints.Surely not a condition to rely on.Noted by Coverity
1 parent660d5fb commitbd905a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/backend/commands/alter.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ ExecAlterObjectDependsStmt(AlterObjectDependsStmt *stmt, ObjectAddress *refAddre
422422
if (refAddress)
423423
*refAddress=refAddr;
424424

425-
recordDependencyOn(&address,refAddress,DEPENDENCY_AUTO_EXTENSION);
425+
recordDependencyOn(&address,&refAddr,DEPENDENCY_AUTO_EXTENSION);
426426

427427
returnaddress;
428428
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp