BUG #18798: /src/interfaces/ecpg/preproc/type.c possible NULL deref - Mailing list pgsql-bugs

From PG Bug reporting form
Subject BUG #18798: /src/interfaces/ecpg/preproc/type.c possible NULL deref
Date
Msg-id 18798-456de8a9c1ea053f@postgresql.org
Whole thread Raw
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      18798
Logged by:          Daniel Elishakov
Email address:      dan-eli@mail.ru
PostgreSQL version: 16.6
Operating system:   ubuntu 20.04
Description:

After having been compared to a NULL value at type.c:267, pointer 'ind_name'
is passed as 2nd parameter in call to function 'ECPGdump_a_simple' at
type.c:398, where it is dereferenced at type.c:423. Looks like there is
inconsistency with 'ind_name' and 'int_type' checks. In one place both are
checked. In other place only the second one is checked. It's possible that
when the second is not NULL the first is also not NULL. If this is so then
the problem is not real. But it's hard to prove this. In any case the code
needs to be made more clear.


pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #18797: pointer te->defn not checked for NULL
Next
From: PG Bug reporting form
Date:
Subject: BUG #18799: /src/interfaces/ecpg/pgtypeslib/timestamp.c possible NULL deref