pgsql: Prevent overflow for block number in buffile.c

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Prevent overflow for block number in buffile.c
Date: 2023-11-20 00:26:49
Message-ID: E1r4s7l-006Hr7-AF@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Prevent overflow for block number in buffile.c

As coded, the start block calculated by BufFileAppend() would overflow
once more than 16k files are used with a default block size. This issue
existed before b1e5c9fa9ac4, but there's no reason not to be clean about
it.

Per report from Coverity, with a fix suggested by Tom Lane.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/3650e7a3933166b40f7f9043bd91f45d3467c74d

Modified Files
--------------
src/backend/storage/file/buffile.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Daniel Gustafsson 2023-11-20 21:53:20 Re: pgsql: llvmjit: Use explicit LLVMContextRef for inlining
Previous Message Daniel Gustafsson 2023-11-19 20:08:24 Re: pgsql: llvmjit: Use explicit LLVMContextRef for inlining