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

Commita190738

Browse files
committed
Fix out-of-array-bounds compiler warning
Since the array length check is using a post-increment operator, thecompiler complains that there's a potential write to one element beyondthe end of the array. This is not possible currently: the only path tothis function is through pg_get_object_address(), which already verifiesthat the input array is no more than two elements in length. Still, abug is a bug.No idea why my compiler doesn't complain about this ...Pointed out by Dead Rasheed and Peter Eisentraut
1 parenta61fd53 commita190738

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/backend/catalog/objectaddress.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1428,7 +1428,7 @@ get_object_address_opf_member(ObjectType objtype,
14281428
typenames[i]=strVal(lfirst(cell));
14291429
typaddr=get_object_address_type(OBJECT_TYPE,cell,missing_ok);
14301430
typeoids[i]=typaddr.objectId;
1431-
if (i++ >=2)
1431+
if (++i >=2)
14321432
break;
14331433
}
14341434

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp