pgsql: Catch invalid typlens in a couple of places

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Catch invalid typlens in a couple of places
Date: 2019-11-04 09:37:14
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Catch invalid typlens in a couple of places

Rearrange the logic in record_image_cmp() and record_image_eq() to
error out on unexpected typlens (either not supported there or
completely invalid due to corruption). Barring corruption, this is
not possible today but it seems more future-proof and robust to fix
this.

Reported-by: Peter Geoghegan <pg(at)bowt(dot)ie>

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/2dbe5706bb9485d7293798e8f80e9d9ba78fbfdc

Modified Files
--------------
src/backend/utils/adt/rowtypes.c | 117 ++++++++++++++++++++-------------------
1 file changed, 61 insertions(+), 56 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2019-11-04 10:12:02 pgsql: Fix some compiler warnings on older compilers
Previous Message Tom Lane 2019-11-03 21:11:30 pgsql: Suppress warning from older compilers.