Don't pass NULL pointer to strcmp().

Xing Guo <higuoxing@gmail.com>

From: Xing Guo <higuoxing@gmail.com>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2023-11-01T09:25:42Z
Lists: pgsql-hackers

Attachments

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

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Make GetConfigOption/GetConfigOptionResetString return "" for NULL.

  2. Be more wary about NULL values for GUC string variables.

  3. doc: Replace reference to ERRCODE_RAISE_EXCEPTION by "raise_exception"