pgsql: Catch invalid typlens in a couple of places

Started by Peter Eisentrautover 6 years ago1 messagescomitters
Jump to latest
#1Peter Eisentraut
peter_e@gmx.net

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@bowt.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(-)