Re: [BUG/PATCH] backend crashes during authentication if data/global/pg_pwd is empty - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [BUG/PATCH] backend crashes during authentication if data/global/pg_pwd is empty
Date
Msg-id 21239.1070638673@sss.pgh.pa.us
Whole thread Raw
In response to [BUG/PATCH] backend crashes during authentication if data/global/pg_pwd is empty  (Michael Wildpaner <mike@rainbow.studorg.tuwien.ac.at>)
Responses Re: [BUG/PATCH] backend crashes during authentication if data/global/pg_pwd is empty
List pgsql-hackers
Michael Wildpaner <mike@rainbow.studorg.tuwien.ac.at> writes:
> +    /* fail if there is nothing to search in */
> +    if ((user_sorted == NULL) || (user_length == 0))
> +        return NULL;

Hm, Solaris' bsearch() fails on empty input?  How bizarre.
Easily worked around though --- thanks for the report!

I suspect we'd better put a defense in get_group_line as well.
It looks like there are no other places at risk in the backend.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Michael Wildpaner
Date:
Subject: [BUG/PATCH] backend crashes during authentication if data/global/pg_pwd is empty
Next
From: Tom Lane
Date:
Subject: Re: [BUG/PATCH] backend crashes during authentication if data/global/pg_pwd is empty