Avoid possible dereference null pointer (src/backend/utils/cache/relcache.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/backend/utils/cache/relcache.c)
Date: 2025-06-16 19:44:05
Message-ID: CAEudQAoOZ3MH4URdnZWD2tAVRsQvN=9=JuMsOj97GgDaqbkq0Q@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi.

The function *ScanPgRelation* can return a invalid tuple.
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
fix-possible-dereference-null-pointer-relcache.patch application/octet-stream 629 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2025-06-16 19:45:43 Re: No error checking when reading from file using zstd in pg_dump
Previous Message Corey Huinker 2025-06-16 19:39:07 Re: Allow pg_dump --statistics-only to dump foreign table statistics?