Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane2021-09-09 15:45:48 +0000
committerTom Lane2021-09-09 15:45:48 +0000
commit8481f99896a192e9fd57f5e1a99e255e27680a10 (patch)
tree4fc0624ee151f082816c8a96c79bbc6717d9b6b7 /src/backend/regex/regcomp.c
parent596ba75cb11173a528c6b6ec0142a282e42b69ec (diff)
Check for relation length overrun soon enough.
We don't allow relations to exceed 2^32-1 blocks, because block numbers are 32 bits and the last possible block number is reserved to mean InvalidBlockNumber. There is a check for this in mdextend, but that's really way too late, because the smgr API requires us to create a buffer for the block-to-be-added, and we do not want to have any buffer with blocknum InvalidBlockNumber. (Such a case can trigger assertions in bufmgr.c, plus I think it might confuse ReadBuffer's logic for data-past-EOF later on.) So put the check into ReadBuffer. Per report from Christoph Berg. It's been like this forever, so back-patch to all supported branches. Discussion: https://postgr.es/m/YTn1iTkUYBZfcODk@msg.credativ.de
Diffstat (limited to 'src/backend/regex/regcomp.c')
0 files changed, 0 insertions, 0 deletions