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

Commitc7c7d71

Browse files
committed
fix null pointer access in get_tableoids_list()
1 parentfe6e10c commitc7c7d71

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

‎src/utils.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,10 @@ get_tableoids_list(List *tlist)
101101
if (!IsA(var,Var))
102102
continue;
103103

104-
if (strlen(te->resname)>TABLEOID_STR_BASE_LEN&&
105-
0==strncmp(te->resname,TABLEOID_STR(""),TABLEOID_STR_BASE_LEN)&&
106-
var->varoattno==TableOidAttributeNumber)
104+
/* Check that column name begins with TABLEOID_STR & it's tableoid */
105+
if (var->varoattno==TableOidAttributeNumber&&
106+
(te->resname&&strlen(te->resname)>TABLEOID_STR_BASE_LEN)&&
107+
0==strncmp(te->resname,TABLEOID_STR(""),TABLEOID_STR_BASE_LEN))
107108
{
108109
result=lappend(result,te);
109110
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp