Content-Length: 257709 | pFad | http://github.com/postgrespro/postgres_cluster/commit/bd905a0d0416628b4aef153463c1f5e5b80b3e96

ED Fix possible NULL dereference in ExecAlterObjectDependsStmt · postgrespro/postgres_cluster@bd905a0 · GitHub
Skip to content

Commit bd905a0

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

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
return address;
428428
}

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/bd905a0d0416628b4aef153463c1f5e5b80b3e96

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy