Re: Don't pass NULL pointer to strcmp().
От | Aleksander Alekseev |
---|---|
Тема | Re: Don't pass NULL pointer to strcmp(). |
Дата | |
Msg-id | CAJ7c6TPAF6xthpQ1yXgV=aQvqoXz_GnAT7m85uMgBTqR7jAzjw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Don't pass NULL pointer to strcmp(). (Junwang Zhao <zhjwpku@gmail.com>) |
Ответы |
Re: Don't pass NULL pointer to strcmp().
|
Список | pgsql-hackers |
Hi, > > 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. -- Best regards, Aleksander Alekseev
В списке pgsql-hackers по дате отправления: