From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Suppress integer-overflow compiler warning for inconsistent sun_ |
Date: | 2022-02-14 16:25:53 |
Message-ID: | E1nJeAj-0007Jx-TU@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Suppress integer-overflow compiler warning for inconsistent sun_len.
On AIX 7.1, struct sockaddr_un is declared to be 1025 bytes long,
but the sun_len field that should hold the length is only a byte.
Clamp the value we try to store to ensure it will fit in the field.
(This coding might need adjustment if there are any machines out
there where sun_len is as wide as size_t; but a preliminary survey
suggests there's not, so let's keep it simple.)
Discussion: https://postgr.es/m/2781112.1644819528@sss.pgh.pa.us
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/291ec6e45ebe1a87f930a250ad3c6672472b9b19
Modified Files
--------------
src/common/ip.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2022-02-14 17:02:43 | Re: pgsql: Database-level collation version tracking |
Previous Message | Tom Lane | 2022-02-14 15:56:27 | pgsql: Delete contrib/xml2's legacy implementation of xml_is_well_forme |