| From: | James Hunter <james(dot)hunter(dot)pg(at)gmail(dot)com> |
|---|---|
| To: | Michael Paquier <michael(at)paquier(dot)xyz> |
| Cc: | Evgeniy Gorbanyov <gorbanyoves(at)basealt(dot)ru>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Re: Possible integer overflow in bringetbitmap() |
| Date: | 2025-01-10 19:22:37 |
| Message-ID: | CAJVSvF4b8R7qG0otbQBD4Ps-wSKVpj9BsRrMhSGzUXE1JthFpQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Fri, Dec 20, 2024 at 3:22 PM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>
> On Tue, Dec 10, 2024 at 12:33:08PM +0900, Michael Paquier wrote:
> > Sure, you could do (a) and (b) together. It also seems to me that it
> > is just simpler to make totalpages a int64 to map automatically with
> > the result expected by the caller of bringetbitmap(), and we know that
> > based on MaxBlockNumber we'll never run out of bits.
>
> That should be simple enough. Are you planning to send a proposal of
> patch?
Attached the proposed one-line fix.
James
| Attachment | Content-Type | Size |
|---|---|---|
| 0001-Fix-integer-overflow-in-bringetbitmap.patch | application/octet-stream | 1.2 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Nathan Bossart | 2025-01-10 19:26:06 | Re: Proposal: add new API to stringinfo |
| Previous Message | Nathan Bossart | 2025-01-10 19:19:55 | Re: use a non-locking initial test in TAS_SPIN on AArch64 |