summaryrefslogtreecommitdiff
path: root/src/interfaces/libpq/fe-protocol2.c
diff options
context:
space:
mode:
authorDean Rasheed <dean.a.rasheed@gmail.com>2025-10-25 11:08:46 +0100
committerDean Rasheed <dean.a.rasheed@gmail.com>2025-10-25 11:08:46 +0100
commit7e2af1fb1118a547bd831fca3afbc3ff80ebf089 (patch)
treebfe74f369066d67877f6c1c71f3e6ca5b8d8569f /src/interfaces/libpq/fe-protocol2.c
parent5173bfd0443e0c0f3fa37006727d516dc1ba4cee (diff)
Guard against division by zero in test_int128 module.
When testing 128/32-bit division in the test_int128 test module, make sure that we don't attempt to divide by zero. While at it, use pg_prng_int64() and pg_prng_int32() to generate the random numbers required for the tests, rather than pg_prng_uint64(). This eliminates the need for any implicit or explicit type casts. Author: Dean Rasheed <dean.a.rasheed@gmail.com> Reported-by: Andres Freund <andres@anarazel.de> Discussion: https://postgr.es/m/da4wqngd6gwz5s4yf5y5f75xj7gpja62l4dbp6w4j3vs7fcjue@upvolcu4e6o2
Diffstat (limited to 'src/interfaces/libpq/fe-protocol2.c')
0 files changed, 0 insertions, 0 deletions