[PATCH] Use mul_size for allocation products potentially to overflow

From: Xing Guo <higuoxing(at)gmail(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: [PATCH] Use mul_size for allocation products potentially to overflow
Date: 2026-04-09 05:13:59
Message-ID: CACpMh+BxvqwPr6DqOGz_gLWWSPX+EgVLiOwMpqg5e71uvszdbA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi hackers,

I spotted several call sites multiplying runtime variables in palloc
and they can potentially lead
to overflow. I fixed them with mul_size() in backend codes and
pg_mul_size_overflow() in frontend codes.

Best Regards,
Xing

Attachment Content-Type Size
0001-Use-mul_size-for-allocation-products-potentially-to-.patch application/octet-stream 4.6 KB

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Korotkov 2026-04-09 06:00:06 Re: Bug: WAIT FOR LSN crashes with assertion failure inside PL/pgSQL DO blocks and procedures
Previous Message Amit Kapila 2026-04-09 04:54:05 Re: Adding REPACK [concurrently]