pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix possible null pointer dereference or invalid warning message
2+ messages / 2 participants
[nested] [flat]

* pgsql: Fix possible null pointer dereference or invalid warning message
@ 2017-04-30 16:21  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2017-04-30 16:21 UTC (permalink / raw)
  To: pgsql-committers

Fix possible null pointer dereference or invalid warning message.

Thinko in commit de4389712: this warning message references the wrong
"LogicalRepWorker *" variable.  This would often result in a core dump,
but if it didn't, the message would show the wrong subscription OID.

In passing, adjust the message text to format a subscription OID
similarly to how that's done elsewhere in the function; and fix
grammatical issues in some nearby messages.

Per Coverity testing.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/12d11432b4db8a2ae665287e05f0f6868d35545e

Modified Files
--------------
src/backend/replication/logical/launcher.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Fix possible NULL pointer dereference in GetNamedDSMSegment().
@ 2024-01-23 02:45  Nathan Bossart <nathan@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Nathan Bossart @ 2024-01-23 02:45 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix possible NULL pointer dereference in GetNamedDSMSegment().

GetNamedDSMSegment() doesn't check whether dsm_attach() returns
NULL, which creates the possibility of a NULL pointer dereference
soon after.  To fix, emit an ERROR if dsm_attach() returns NULL.
This shouldn't happen, but it would be nice to avoid a segfault if
it does.  In passing, tidy up the surrounding code.

Reported-by: Tom Lane
Reviewed-by: Michael Paquier, Bharath Rupireddy
Discussion: https://postgr.es/m/3348869.1705854106%40sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/4372adfa24f2f5ddc587317d634b5389bd764106

Modified Files
--------------
src/backend/storage/ipc/dsm_registry.c | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2024-01-23 02:45 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-04-30 16:21 pgsql: Fix possible null pointer dereference or invalid warning message Tom Lane <tgl@sss.pgh.pa.us>
2024-01-23 02:45 pgsql: Fix possible NULL pointer dereference in GetNamedDSMSegment(). Nathan Bossart <nathan@postgresql.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox