aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/execParallel.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2022-12-21 17:51:50 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2022-12-21 17:51:50 -0500
commitf489b480f4aa8b4db4858a7bef1b42c984992c8a (patch)
tree6eac6eeb118c6a7cd3c54a8f585bc8df7b3556ba /src/backend/executor/execParallel.c
parentea5ae4cae6a230e048f0ff4587b54d441712c6fd (diff)
downloadpostgresql-f489b480f4aa8b4db4858a7bef1b42c984992c8a.tar.gz
postgresql-f489b480f4aa8b4db4858a7bef1b42c984992c8a.zip
Fix contrib/seg to be more wary of long input numbers.
seg stores the number of significant digits in an input number in a "char" field. If char is signed, and the input is more than 127 digits long, the count can read out as negative causing seg_out() to print garbage (or, if you're really unlucky, even crash). To fix, clamp the digit count to be not more than FLT_DIG. (In theory this loses some information about what the original input was, but it doesn't seem like useful information; it would not survive dump/restore in any case.) Also, in case there are stored values of the seg type containing bad data, add a clamp in seg_out's restore() subroutine. Per bug #17725 from Robins Tharakan. It's been like this forever, so back-patch to all supported branches. Discussion: https://postgr.es/m/17725-0a09313b67fbe86e@postgresql.org
Diffstat (limited to 'src/backend/executor/execParallel.c')
0 files changed, 0 insertions, 0 deletions