Don't pass NULL pointer to strcmp().

From: Xing Guo <higuoxing(at)gmail(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Don't pass NULL pointer to strcmp().
Date: 2023-11-01 09:25:42
Message-ID: CACpMh+AyDx5YUpPaAgzVwC1d8zfOL4JoD-uyFDnNSa1z0EsDQQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi hackers,

I found that there's a nullable pointer being passed to strcmp() and
can make the server crash. It can be reproduced on the latest master
branch by crafting an extension[1]. Patch for fixing it is attatched.

[1] https://github.com/higuoxing/guc_crash/tree/pg

--
Best Regards,
Xing

Attachment Content-Type Size
0001-Don-t-use-strcmp-with-nullable-pointers.patch text/x-patch 980 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2023-11-01 09:59:21 Re: GUC names in messages
Previous Message Daniel Gustafsson 2023-11-01 09:23:22 Re: GUC names in messages