diff options
author | Masahiko Sawada <msawada@postgresql.org> | 2024-03-25 12:06:41 +0900 |
---|---|---|
committer | Masahiko Sawada <msawada@postgresql.org> | 2024-03-25 12:06:41 +0900 |
commit | 80d5d4937c168af46c976feebe24765ad76eb540 (patch) | |
tree | 340c1651a503fad1b271ade8705f450ee5bdeebd /src/backend/access/gist/gist.c | |
parent | 66c0185a3d14bbbf51d0fc9d267093ffec735231 (diff) | |
download | postgresql-80d5d4937c168af46c976feebe24765ad76eb540.tar.gz postgresql-80d5d4937c168af46c976feebe24765ad76eb540.zip |
Fix potential integer handling issue in radixtree.h.
Coverity complained about the integer handling issue; if we start with
an arbitrary non-negative shift value, the loop may decrement it down
to something less than zero before exiting. This commit adds an
assertion to make sure the 'shift' is always 0 after the loop, and
uses 0 as the shift to get the key chunk in the following operation.
Introduced by ee1b30f12.
Reported-by: Tom Lane as per coverity
Reviewed-by: Tom Lane
Discussion: https://postgr.es/m/2089517.1711299216%40sss.pgh.pa.us
Diffstat (limited to 'src/backend/access/gist/gist.c')
0 files changed, 0 insertions, 0 deletions