aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist
diff options
context:
space:
mode:
authorAlexander Korotkov <akorotkov@postgresql.org>2025-02-23 23:06:33 +0200
committerAlexander Korotkov <akorotkov@postgresql.org>2025-02-27 11:22:01 +0200
commite167191dc146b65146fbd32e147be30dd8f1f166 (patch)
tree72c7259136d84c452c9527bbe3dd40b76312b0cf /src/backend/access/gist
parent55918f798bc2d1846eea0d805fbec91d4e1816e0 (diff)
downloadpostgresql-e167191dc146b65146fbd32e147be30dd8f1f166.tar.gz
postgresql-e167191dc146b65146fbd32e147be30dd8f1f166.zip
Get rid of ojrelid local variable in remove_rel_from_query()
As spotted by Coverity, the calculation of ojrelid mixes signed and unsigned types causes possible overflow and undefined behavior. Instead of trying to fix the expression, this commit eliminates the relied local variable. The explicit branching is used to replace the -1 value. That, in turn, requires changing the signature of the remove_rel_from_eclass() function. Reported-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/914330.1740330169%40sss.pgh.pa.us Reviewed-by: Andrei Lepikhov <lepihov@gmail.com>
Diffstat (limited to 'src/backend/access/gist')
0 files changed, 0 insertions, 0 deletions