mirror of
https://github.com/postgres/postgres.git
synced 2026-04-21 06:08:26 -04:00
Don't prematurely cram a value into a short int.
Sincea4d75c86b, some buildfarm members have been warning that Assert(attnum <= MaxAttrNumber); is useless if attnum is an AttrNumber. I'm not certain how plausible it is that the value coming out of the bitmap could actually exceed MaxAttrNumber, but we seem to have thought that that was possible back in7300a6995. Revert the intermediate variable to int so that we have the same overflow protection as before.
This commit is contained in:
parent
3b0c647bbf
commit
c545e9524d
1 changed files with 1 additions and 1 deletions
|
|
@ -978,7 +978,7 @@ build_attnums_array(Bitmapset *attrs, int nexprs, int *numattrs)
|
|||
j = -1;
|
||||
while ((j = bms_next_member(attrs, j)) >= 0)
|
||||
{
|
||||
AttrNumber attnum = (j - nexprs);
|
||||
int attnum = (j - nexprs);
|
||||
|
||||
/*
|
||||
* Make sure the bitmap contains only user-defined attributes. As
|
||||
|
|
|
|||
Loading…
Reference in a new issue