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

Commit4c92282

Browse files
committed
Remove NULL dereference from RenameRelationInternal().
Defect in last week's commitaac2c9b,per Coverity. Reaching this would need catalog corruption. Back-patchto v12, like that commit.
1 parent0a709c4 commit4c92282

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/backend/commands/tablecmds.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3990,9 +3990,9 @@ RenameRelationInternal(Oid myrelid, const char *newrelname, bool is_internal, bo
39903990
relrelation = table_open(RelationRelationId, RowExclusiveLock);
39913991

39923992
reltup = SearchSysCacheLockedCopy1(RELOID, ObjectIdGetDatum(myrelid));
3993-
otid = reltup->t_self;
39943993
if (!HeapTupleIsValid(reltup))/* shouldn't happen */
39953994
elog(ERROR, "cache lookup failed for relation %u", myrelid);
3995+
otid = reltup->t_self;
39963996
relform = (Form_pg_class) GETSTRUCT(reltup);
39973997

39983998
if (get_relname_relid(newrelname, namespaceId) != InvalidOid)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp