summaryrefslogtreecommitdiff
path: root/src/backend/commands/cluster.c
diff options
context:
space:
mode:
authorRichard Guo <rguo@postgresql.org>2025-03-26 17:46:51 +0900
committerRichard Guo <rguo@postgresql.org>2025-03-26 17:49:57 +0900
commit34fbfe1f57d84163fea4e234bf78d3b5fd5364b1 (patch)
tree32e8477de78671976ee3ed5520df48854e0c0e66 /src/backend/commands/cluster.c
parentf186f90e55b7d984be572e3628e19e6d018c7199 (diff)
Fix integer-overflow problem in scram_SaltedPassword()
Setting the iteration count for SCRAM secret generation to INT_MAX will cause an infinite loop in scram_SaltedPassword() due to integer overflow, as the loop uses the "i <= iterations" comparison. To fix, use "i < iterations" instead. Back-patch to v16 where the user-settable GUC scram_iterations has been added. Author: Kevin K Biju <kevinkbiju@gmail.com> Reviewed-by: Richard Guo <guofenglinux@gmail.com> Reviewed-by: Michael Paquier <michael@paquier.xyz> Discussion: https://postgr.es/m/CAM45KeEMm8hnxdTOxA98qhfZ9CzGDdgy3mxgJmy0c+2WwjA6Zg@mail.gmail.com
Diffstat (limited to 'src/backend/commands/cluster.c')
0 files changed, 0 insertions, 0 deletions