> > 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
Thanks for reporting. I can confirm that the issue reproduces on the `master` branch and the proposed patch fixes it.
> Can we set a string guc to NULL? If not, `*lconf->variable == NULL` would > be unnecessary.
Judging by the rest of the code we better keep it, at least for consistenc.
I see one more place with a similar code in guc.c around line 1472. Although I don't have exact steps to trigger a crash I suggest adding a similar check there.