Avoid possible dereference null pointer (src/bin/pg_dump/pg_dump.c)

From: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Avoid possible dereference null pointer (src/bin/pg_dump/pg_dump.c)
Date: 2024-09-04 17:10:28
Message-ID: CAEudQAqfMTH8Ya_J6E-NW_y_JyDFDxtQ4V_g6nY_1=0oDbQqdg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi.

Per Coverity.

I think that commit 6ebeeae
<http://6ebeeae29626e742bbe16db3fa6fccf1186c0dfb> left out an oversight.

The report is:
CID 1559991: (#1 of 1): Dereference null return value (NULL_RETURNS)

The function *findTypeByOid* can return NULL.
It is necessary to check the function's return,
as is already done in other parts of the source.

patch attached.

Best regards,
Ranier Vilela

Attachment Content-Type Size
0001-avoid-possible-dereference-null-pointer-pg_dump.patch application/octet-stream 582 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alena Rybakina 2024-09-04 17:23:00 Re: Vacuum statistics
Previous Message Peter Geoghegan 2024-09-04 16:52:57 Re: Adding skip scan (including MDAM style range skip scan) to nbtree