Unify src/common/'s definitions of MaxAllocSize.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: e5babf7541d39cf7c2aee54a5034b1109b9e93ed
Author: Tom Lane <tgl@sss.pgh.pa.us>
Committer: Noah Misch <noah@leadboat.com>
Date: 2026-05-11T12:13:48Z
Releases: 17.10
Unify src/common/'s definitions of MaxAllocSize.

Define MaxAllocSize in src/include/common/fe_memutils.h rather
than having several copies of it in different src/common/*.c files.
This also provides an opportunity to document it better.

Back-patch of commit 11b7de4a7, needed now because assorted security
fixes are adding additional references to MaxAllocSize in frontend
code.

Backpatch-through: 14-17
Security: CVE-2026-6473

Files

PathChange+/−
src/common/psprintf.c modified +0 −3
src/common/saslprep.c modified +0 −4
src/common/stringinfo.c modified +0 −3
src/include/common/fe_memutils.h modified +12 −0